2010-07-07 3 views
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]; 

} 

제발 도와주세요.

감사합니다.

답변

0

공항에서 켜져 이제 제대로 작동하는 것 같습니다. 매우 이상한 ....

이것은 이전에 Xcode 3.1.3에서보고되었습니다. 하지만 지금부터는 시뮬레이터에서 항상 3.1.2를 사용했습니다. iOS4로 업데이트하면이 문제가 나타납니다. 매우 성가신 ....

관련 문제