1
현재지도 기능에서 작업 중이며 현재 위치를 가져와 표시했습니다. 이제 iOS4.CLLocationManger에서 내 앱을 실행하고 있습니다. 대리인 메서드는 iOS4에서 앱을 실행할 때 호출하지 않습니다. 하지만 Xcode 3.1.4 이전 버전에서 응용 프로그램을 실행할 수 있습니다. 제대로 작동하고 대리자 메서드도 제대로 호출됩니다. 그래서 어떻게 iOS4에서 CLLocationManger 대리자 메서드를 호출 할 수 있습니까? 그게 나에게는 매우 이상합니다.CLLocationManager 대리자 메서드가 iOS4에서 호출되지 않았습니다.
- (void)locationManager: (CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSLog(@"inside didUpdateToLocation");
MKCoordinateRegion region1;
region1.center = newLocation.coordinate;
region1.span.latitudeDelta = 0.001;
region1.span.longitudeDelta = 0.001;
mapview.mapType = MKMapTypeStandard;
[mapview setRegion:region1 animated:TRUE];
[locationManager stopUpdatingLocation];
}
제발 도와주세요.
감사합니다.