我正在运行需要启用LocationServices的应用程序。我正在检查他们是否通过拨打服务电话并发现错误。在错误情况下,我想弹出一个alertview,通知用户激活位置服务。当这个测试发生时,我已经打开了另一个AlertView。我想关闭那个,并给用户我之前提到的对话框。关闭UIAlertView并用另一个替换
目前,我有
case kCLErrorDenied: // CL access has been denied (eg, user declined location use)
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"NOTICE"
message:@"Sorry, this application needs your location. Please select 'Allow' when asked to use your current location. You don't need to be on or near the trail."
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"EXIT"];
[alert show];
[alert release];
//exit(0);
break;
这会导致应用程序只是退出。我有一个NSLog输出在那里,所以我知道它到了这种情况。
谢谢。我也注意到了。我在里面放了一些处理代码,现在它工作的很好。 – Adam 2010-07-09 21:07:31