简体   繁体   中英

'CLLocationManagerDelegate' cannot be constructed because it has no accessible initializers

I am a newbie coder and I am using a tutorial to help me learn.

I am making a weather app, but I am receiving this error and was hoping someone could help.

'CLLocationManagerDelegate' cannot be constructed because it has no accessible initializers

无法构造“ CLLocationManagerDelegate”,因为它没有可访问的初始化程序

Thank you.

WeatherViewController is already the CLLocationManagerDelegate .

You should be instantiating CLLocationManager instead:

let locationManager = CLLocationManager()

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