我正在開發iOS 4應用程序。發生錯誤時通知父類
我有一個ViewController包含另一個類。在這門課上,我使用CoreLocation來跟蹤GPS和航向。
我要通知ViewController中,有關於GPS用這種方法跟蹤誤差:
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
我要檢查,如果用戶關閉位置跟蹤,並顯示出AlertView,但我只能這樣做對一個viewController。
如何在發生此錯誤時通知ViewController?