Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 无法分配类型为';AppDelegate';输入';CLLocationManagerDelegate?&x27;_Ios_Swift_Core Location - Fatal编程技术网

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 {}