Bir süre yüksek doğru veri elde etmek için beklemek bu kod var olsun kadar beklemek nasılkonum Yöneticisi yüksek doğru veriler
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
if((newLocation.horizontalAccuracy < 150 && newLocation.horizontalAccuracy > 0 /* valid */ && abs(howRecent) < 15.0 /*If it's a relatively recent event less than 15 seconds */))
}
ben beklemek zorundayız başvurumun diğer bölümünde sorunu Bu yöntem geri gelmek, bu yüzden kullandı:
[NSThread sleepForTimeInterval:5]; // wait 5 seconds
bu iyi bir uygulama mı yoksa başka bir görev yürütme için beklemek daha iyi bir yol yoktur.
Sen CLLocationAccuracyBest' veya amaca uygun başka bir değere 'için' desiredAccuracy' belirtebilirsiniz: http://developer.apple.com/library/ios/DOCUMENTATION/CoreLocation/Reference/CoreLocationConstantsRef/Reference/reference .html # // apple_ref/doc/uid/TP40010237-CH2-SW9 –