Swift Protocol Magic II: Designing a Reusable Location Tracking System
Salah Nahed
How to stop rewriting CLLocationManager boilerplate in every screen — and design something your future self will actually thank you for.* If you've shipped more than a couple of iOS apps, you've written this code. Probably more than once. Maybe more than ten times. locationManager . delegate = self locationManager . requestWhenInUseAuthorization () // ...somewhere else... func locationManager ( _ manager : CLLocationManager , didUpdateLocations locations : [ CLLocation ]) { // do the thing } And
Tags
