2010-07-07 67 views
1

我目前正在使用Map功能,並獲取當前位置並顯示。現在,我在iOS4中運行我的應用程序。在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時,出現了這個問題。非常討厭....

相關問題