就像在iOS中使用Location Service Enabling
或GPS Enabling
一样,我怎样才能启用Location Service Enabling
来运行应用程序? iOS中还有Background Refresh Service
。这里是代码,使用我启用Location Service
。 这里发生的是:如果我的Location Service
已关闭,那么它会显示一个alertView,如果我点击settings
按钮,它会将我带到设置>>隐私>>位置服务页面。如何打开或关闭iOS中特定应用程序的“位置服务检查”
代码:
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
[locationManager startUpdatingLocation];
有什么东西好用像上面的代码?
我不明白你的意思。你想要的东西像'locationManager:didUpdateToLocation:fromLocation:'? – theShay