【发布时间】:2014-06-09 13:53:20
【问题描述】:
我尝试在我的 Swift 应用程序中使用 CoreLocation,但没有运气。我有以下非常简单的代码:
(我已经链接了 CoreLocation 库。)
import UIKit
import CoreLocation
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate {
var window: UIWindow?
var locationManager: CLLocationManager = CLLocationManager()
locationManager.delegate = self
在最后一行我收到错误“预期声明”。
我做错了什么?
提前致谢!
【问题讨论】: