IOS判断定位服务是否开启
2018-10-27 本文已影响0人
安静的程序员
#import <CoreLocation/CoreLocation.h>
if ([CLLocationManager locationServicesEnabled] == YES)
{
NSLog(@"定位服务已启用");
}
else
{
NSLog(@"请开启定位服务");
}
#import <CoreLocation/CoreLocation.h>
if ([CLLocationManager locationServicesEnabled] == YES)
{
NSLog(@"定位服务已启用");
}
else
{
NSLog(@"请开启定位服务");
}