Ich versuche, die Benutzer aktuelle geografische Breite und Länge mit diesem viewDidLoad Verfahren zu erhalten. Die resultierende Karte anzeigt, korrekt die aktuelle Position jedoch die NSLog konsequent zeigt:
2009-09-19 16:45:29.765 Mapper[671:207] user latitude = 0.000000
2009-09-19 16:45:29.772 Mapper[671:207] user longitude = 0.000000
Wer weiß, was ich hier fehlt? Vielen Dank im Voraus für Ihre Hilfe!
- (void)viewDidLoad {
[super viewDidLoad];
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
[mapView setShowsUserLocation:YES];
CLLocation *userLoc = mapView.userLocation.location;
CLLocationCoordinate2D userCoordinate = userLoc.coordinate;
NSLog(@user latitude = %f,userCoordinate.latitude);
NSLog(@user longitude = %f,userCoordinate.longitude);
}













