這裏是我的代碼CLLocationManager不給我我的位置
CLLocationManager* locationManager = [[[CLLocationManager alloc]init]autorelease];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = kCLDistanceFilterNone;
[locationManager startUpdatingLocation];
NSLog(@"Latitude :%f",locationManager.location.coordinate.latitude);
CLLocation* currentLocation = [locationManager location];
_drivingReverseGeocoder = [[MKReverseGeocoder alloc] initWithCoordinate:[currentLocation coordinate]];
[_drivingReverseGeocoder setDelegate:self];
[_drivingReverseGeocoder start];
當我做我的NSLog我的長和LAT是0.000000。另外,我正在使用模擬器,但我期望我的長和緯度位於我當前位置所在的無限循環處。有沒有人有任何見解?
你在使用'CLLocationManagerDelegate'嗎? – 2011-04-29 19:40:33
是的,我是我沒有正確實施它?如果你使用模擬器,它總是對每個人說0.0? – nina 2011-04-29 20:39:51