iOS reason: ‘Invalid Region <center:+113.15000000, +23.02000000 span:+1.25000000, +1.25000000>’

释放双眼,带上耳机,听听看~!

原因:latitude 113,已经超过范围是超出范围了,加上范围判断, 如下所示:

 if ( (theRegion.center.latitude >= -90) && (theRegion.center.latitude <=90) && (theRegion.center.longitude
>= -180) && (theRegion.center.longitude <=180) ){

        

    [mapView setRegion:[mapView regionThatFits:theRegion] animated:YES];

    

}else{

   NSLog(@"invilid region");

    

}

 

人已赞赏
iOS文章

Warning: The Copy Bundle Resources build phase contains this target's Info.plist file

2020-5-8 0:18:08

iOS文章

iOS reason: loaded the "XXX.xib" nib but the view outlet was not set.'

2020-5-8 1:33:02

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
有新消息 消息中心
搜索