1

在我正在调用的视图 didload 方法中

  /**initialize location manager**/
    if (nil == locationManager)
        locationManager = [[CLLocationManager alloc] init];
    //set the delegate for the location manager
    //locationManager.delegate = self;
    // set your desired accuracy
    locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
    [locationManager startUpdatingLocation];

Tableview在加载时获得用户的许可。

如何捕捉用户授权应用随时获得许可的事件

status == kCLAuthorizationStatusAuthorized

然后重新加载表?

4

1 回答 1

1

CLLocationManagerDelegate在您的位置管理器实例上 注册一个-[CLLocationManager setDelegate:]. 您的代表应该实施-[CLLocationManagerDelegate locationManager:didChangeAuthorizationStatus:].

于 2013-05-09T02:03:33.177 回答