1、打开项目中info.plist.
2、添加两项:NSLocationAlwaysUsageDescription和NSLocationWhenInUseDescription,值对应的是Boolean设置为YES。
代码实现如下:
#import <CoreLocation/CoreLocation.h>
@interface AppDelegate : UIResponder <CLLocationManagerDelegate>
@property (nonatomic,retain) CLLocationManager *locationManager;
@synthesize
2万+



被折叠的 条评论
为什么被折叠?



