使用氯乙烯 拥有代表的经理前往该地点。 如果失误,则检查错误代码,看看用户是否拒绝在附录中提供地点:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
UIAlertView *alert;
//denied?
if(error.code == kCLErrorDenied) alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"Error title header") message:NSLocalizedString(@"Turn on Location Services in Settings to use your location",@"Turn on Location Services in Settings to use your location") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
else alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error",@"Error title header") message:NSLocalizedString(@"At the moment it is not possible to retreive your location",@"At the moment it is not possible to retreive your location") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}