在Info.plist中加入两个缺省没有的字段(自定义提示用户授权使用地理定位功能时的提示语
)
- NSLocationAlwaysUsageDescription (string类型)
-
NSLocationWhenInUseUsageDescription
#import
<CoreLocation/CoreLocation.h>
//#import <MapKit/MapKit.h>
#define IS_IOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >=
8
)
@property
(
strong
,
nonatomic
)
CLLocationManager
*locationManager;
@property
(
nonatomic
,
strong
)
CLGeocoder
*geo;
@property
(
nonatomic
,
copy
NSLocationWhenInUseUsageDescription
@property ( nonatomic , strong ) CLGeocoder *geo;