I import CoreLocation
, then add locationManager.delegate = self
in didFinishLaunchingWithOptions
and let locationManager = CLLocationManager()
out of it.
But I have this error in AppDelegate. What do I wrong?
您需要使AppDelegate符合CLLocationManagerDelegate.
class AppDelegate: UIApplicationDelegate, CLLocationManagerDelegate {}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.