AlertPrompt被CLLocation提示破坏

时间:2013-09-16 23:03:33

标签: ios uialertview cllocation

在我的应用首次启动时,会出现一个AlertPrompt,要求提供电子邮件地址。这恰好在CLLocation的内置警报出现之前发生,消除了我的电子邮件提示。一旦我选择“确定”(允许应用程序使用您当前的位置),我的电子邮件提示就会回来。我正在将此用于电子邮件提示:

- (void)askEmailReal {
    AlertPrompt *prompt = [AlertPrompt alloc];
    prompt = [prompt initWithTitle:nil 
                           message:text
                          delegate:nil
                 cancelButtonTitle:@"No thanks" 
                     okButtonTitle:@"Submit"];
    [prompt show];

不确定如何最好地继续。是否可以阻止系统的位置提示,直到我的点击为止?或者也许我应该确保我的追求?

1 个答案:

答案 0 :(得分:1)

不,没有办法阻止系统提示。如果您确实希望在系统当前位置提示之前弹出您的电子邮件,那么只需分配CLLocationManager并在收到用户输入其电子邮件的alertview回调后拨打您的初始startUpdatingLocation凭证。