我必须在 iPhone OS 4.0 中运行我的应用程序。(在模拟器中)。
-(BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self newLocationUpdate];
}
-(void)newLocationUpdate
{
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
[locationManager startUpdatingLocation];
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
[locationManager stopUpdatingLocation];
}
在这个 CLLocationManager 委托方法没有被调用。我们应该进行哪些更改才能调用委托方法?