Joh*_*elp 3 iphone gps objective-c ios
使用BOOL locaService = [CLLocationManager locationServicesEnabled];
它将返回一般GPS服务的布尔值,我们如何检查服务是否打开或关闭特定的应用程序.
小智 9
[CLLocationManager authorizationStatus]返回一个CLAuthorizationStatustypedef为kCLAuthorizationStatusNotDetermined, kCLAuthorizationStatusRestricted, kCLAuthorizationStatusDenied,或的kCLAuthorizationStatusAuthorized.
kCLAuthorizationStatusAuthorized 意味着你可以使用GPS,其他任何意味着你不能.
(kCLAuthorizationStatusDenied意味着他们已禁止您,kCLAuthorizationStatusRestricted意味着由于家长控制而无法使用, kCLAuthorizationStatusNotDetermined意味着用户尚未响应"允许此应用查看我的位置?"提示.)
| 归档时间: |
|
| 查看次数: |
2798 次 |
| 最近记录: |