The methods that you use to receive events from an associated location manager object.
Declaration
protocol CLLocationManagerDelegate
Overview
The location manager calls its delegate’s methods to report location-related events to your app. Implement this protocol in an app-specific object and use the methods to update your app. For example, you might use the current location to update the user’s position on a map or you might return search results relevant only to the user’s current location.
Important
Always implement the methods for handling any potential failures in addition to the methods for receiving location-related data.
Assign your delegate object to the delegate property of the CLLocationManager object before starting any services. Core Location may report a cached value to your delegate immediately after you start the service, followed by a more current value later. Check the time stamp of any data objects you receive before using them.
The methods of your delegate object are called from the thread in which you started the corresponding location services. That thread must itself have an active run loop, like the one found in your app’s main thread.
developer.apple.com/documentation/corelocation/cllocationmanagerdelegate
Apple Developer Documentation
developer.apple.com
'Programming > Swift' 카테고리의 다른 글
GCD Concepts (0) | 2021.02.10 |
---|---|
[ios] Self-Sizing Table View Cells (0) | 2021.01.22 |
Optional (0) | 2021.01.14 |
Structures and Classes (0) | 2021.01.14 |
Choosing Between Structures and Classes (0) | 2021.01.14 |