iPhoneSettings.locationServiceEnabledByUser 由用户启用定位服务
static var locationServiceEnabledByUser : bool
Description描述
The user can enable or disable location services altogether from the Settings application by toggling the switch in Settings>General>LocationServices.
用户可以完全启用和禁止定位服务通过在设置程序中Settings>General>LocationServices中的开关去切换。
You should check this property before starting location updates to determine if the user has location services enabled for the current device. If this property contains the value false and you start location updates anyway, the CoreLocation framework prompts the user with a confirmation panel asking whether location services should be reenabled.
你应该在开始定位刷新前检查这个属性来决定用户是否有可用的定位服务在当前设备。如果这个属性是假并且你以任何方式开始位置更新,CoreLocation(定位核心)框架提示用户用一个确认窗口,要求是否应该重新开始位置服务。