简体   繁体   中英

Cannot assign value of type 'AppDelegate' to type 'CLLocationManagerDelegate?'

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM