Ios 无法分配类型为';AppDelegate';输入';CLLocationManagerDelegate?&x27;
我导入Ios 无法分配类型为';AppDelegate';输入';CLLocationManagerDelegate?&x27;,ios,swift,core-location,Ios,Swift,Core Location,我导入CoreLocation,然后在didfishLaunchingwithoptions中添加locationManager.delegate=self,然后让locationManager=CLLocationManager()退出 但是我在AppDelegate中有这个错误。我错在哪里?您需要使您的AppDelegate符合CLLocationManagerDelegate. class AppDelegate: UIApplicationDelegate, CLLocationMana
CoreLocation
,然后在didfishLaunchingwithoptions
中添加locationManager.delegate=self
,然后让locationManager=CLLocationManager()
退出
但是我在AppDelegate中有这个错误。我错在哪里?您需要使您的AppDelegate符合
CLLocationManagerDelegate.
class AppDelegate: UIApplicationDelegate, CLLocationManagerDelegate {}