if([cllocationmanager locationservicesenabled]){ self.locationmanage = [[[cllocationmanager alloc] init] autorelease]; self.locationmanage.delegate = self; self.locationmanage.distancefilter = 200; self.locationmanage.desiredaccuracy = kcllocationaccuracybest;
}
if (system_version >= 8.0) { [self.locationmanage requestwheninuseauthorization];// <span style="font-family: arial, helvetica, sans-serif;">requestalwaysauthorization</span> }
<span style="font-family: arial, helvetica, sans-serif;"> }</span><span style="font-family: arial, helvetica, sans-serif;"> </span>}
ios8之后, 定位的delegate不能触发的问题。
1. 需要添加如上的判断中的授权语句。
2. plist中添加键nslocationalwaysusagedescription 和 nslocationwheninuseusagedescription