美文网首页
CLLocationManager定位权限弹出后立即消失

CLLocationManager定位权限弹出后立即消失

作者: imzhuzx | 来源:发表于2021-07-15 14:54 被阅读0次

系统弹出请求定位权限弹框后还没点击立马就消失了,想了半天没有想到为什么。
只能求助度娘


image.png

好像说的不错,然后去看看自己的代码,发现是全局的。有迷茫了,
最后又认真研究了自己的代码,果然是自己的问题

- (void)rightButtonClick{
        
    [self locationAdd];
    
}

- (void)locationAdd{
    
    ZZXCLLocationAdd *cllocationAdd = [[ZZXCLLocationAdd alloc] init];
    [cllocationAdd startUpdateLocation];    
        
}//ZZXCLLocationAdd到这就没了

相关文章

网友评论

      本文标题:CLLocationManager定位权限弹出后立即消失

      本文链接:https://www.haomeiwen.com/subject/rjappltx.html