以编程方式检查iPhone上是否启用了GPS

时间:2011-01-30 08:35:16

标签: iphone gps

如何检查iPhone上是否启用了GPS?

1 个答案:

答案 0 :(得分:26)

http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html

[CLLocationManager locationServicesEnabled]

返回一个布尔值,指示是否在设备上启用了位置服务。