我必须在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中,委托方法未被调用。我们应该做什么改变才能调用委托方法?
答案 0 :(得分:3)