I am currently working in Map feature and i get the current location and displayed. Now i am running my apps in iOS4.CLLocationManger delegate method is not calling, when running the apps in iOS4. But i could run my application in older version of Xcode 3.1.4. it works fine and delegat开发者_如何学Ce method also called properly. So how can i call the CLLocationManger delegate method in iOS4? Its very weird to me.
- (void)locationManager: (CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSLog(@"inside didUpdateToLocation");
MKCoordinateRegion region1;
region1.center = newLocation.coordinate;
region1.span.latitudeDelta = 0.001;
region1.span.longitudeDelta = 0.001;
mapview.mapType = MKMapTypeStandard;
[mapview setRegion:region1 animated:TRUE];
[locationManager stopUpdatingLocation];
}
Please help me out.
Thanks.
Turned On the Airport and seems to work OK now. Very Weird....
This was also reported before for Xcode 3.1.3. but since now I always used 3.1.2 on Simulator. When I updated to iOS4 this issue appeared. Very annoying....
精彩评论