Hi All,
In my application i am using Corelocation to get the current location.
In this viewWillAppear i am calling this method
-(void)getCurrentLocation {
CLController = [[CoreLocationController alloc] init];
CLController.delegate = self;
[CLController.locMgr startUpdatingLocation];
}
to get the location. Now one default alert shows would you like to use current location" . Everything works fine if i allow to access location. But if i select dont allow and then if i click on the refreshLocation button and calling the below method
-(void)refreshLocation {
[CLController.locMgr stopUpdatingLocation];
[CLController.locMgr startUpdatingLocation];
} it always goes to - (void)locationManager
CLLocationManager *)manager didFailWithError
NSError *)error {
}
Please tell me whats the reason..Any sample code would be great.
Thanks in advance
In my application i am using Corelocation to get the current location.
In this viewWillAppear i am calling this method
-(void)getCurrentLocation {
CLController = [[CoreLocationController alloc] init];
CLController.delegate = self;
[CLController.locMgr startUpdatingLocation];
}
to get the location. Now one default alert shows would you like to use current location" . Everything works fine if i allow to access location. But if i select dont allow and then if i click on the refreshLocation button and calling the below method
-(void)refreshLocation {
[CLController.locMgr stopUpdatingLocation];
[CLController.locMgr startUpdatingLocation];
} it always goes to - (void)locationManager
}
Please tell me whats the reason..Any sample code would be great.
Thanks in advance