2013-09-27 21 views
1

我使用位置服務,以保持我的應用程序存活時間越長,其工作在我的iOS6的(設備及模擬器)的罰款,但在iOS7它不是要求的CLLocationManager此委託功能,位置經理的委託不獲取調用

-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation 

如何使這項工作在iOS7?

+0

它在iOS6的工作的罰款?!?! :) – TonyMkenu

回答

6

這種方法在iOS的6.0

不推薦使用這種方法

-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations 

{ 
location_updated = [locations lastObject];  
NSLog(@"updated coordinate are %@",location_updated); 

} 
+1

我用這個方法。雖然 –

+0

這不是調用,但這是代理方法,它會調用自己,當您在.h文件中設置位置管理器委託時 – morroko

0
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations 

{ 
location_updated = [locations lastObject];  
NSLog(@"updated coordinate are %@",location_updated); 

}