Skip to content

Instantly share code, notes, and snippets.

View jameszaghini's full-sized avatar

James Zaghini jameszaghini

View GitHub Profile
@jameszaghini
jameszaghini / playground.swift
Last active February 13, 2020 04:49
WIP Swift repository pattern
import Foundation
import Combine
struct Thing {}
protocol ThingRepository {
func getAll(completion: @escaping ([Thing]) -> ())
}
protocol ThingDataSource {
@jameszaghini
jameszaghini / MKLocalSearchCompleter.example.swift
Last active December 15, 2019 08:49
Complete addresses with Swift 4, MapKit & MKLocalSearchCompleter
import MapKit
class LocationController: NSObject, MKLocalSearchCompleterDelegate {
func completerDidUpdateResults(_ completer: MKLocalSearchCompleter) {
print(completer.results, "\n--------------------------\n")
}
}
var locationController = LocationController()