我已經跟隨AutoPause的例子來自「會話303 - 從位置服務停留在軌道」 WWDC 2012的iOS 6 AutoPause不起作用
在這個例子中,你可以看到AutoPause如何啓用,並且有兩種方法被稱爲:
-(void) locationManagerDidPauseLocationUpdates:(CLLocationManager *)manager
-(void) locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager
我已經做了同樣的例子,但這些方法都不能永遠不會被調用。 誰試過了?
如果您嘗試在iOS 5上分配pausesLocationUpdatesAutomatically = yes,它會崩潰。 – mskw
以上是肯定的,你必須在使用此屬性之前通過respondsToSelector進行檢查。 –
它適用於我的iPhone 4(iOS6)。當我開始移動時,GPS暫停但不會恢復。 – Lukasz