I in viewDidLoad Methode folgenden Code verwenden unter MethodeWie bekomme ich aktuelle Geopunkte nur einmal im iPhone?
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move
locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
[locationManager startUpdatingLocation];
Dann kontinuierlich aufgerufen wird, wenn Standort geändert.
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
Aber ich möchte aktuelle Geopunkte nur einmal. Gibt es eine Methode, die dir direkt aktuelle Geo-Punkte gibt? Ich möchte die Entfernung zwischen aktuellen Geo-Punkten und anderen Orten berechnen, wenn ich auf eine Schaltfläche klicke. Bitte hilf mir, wenn jemand weiß.