我正在制作一个使用用户位置的 iPhone 应用程序,但是我注意到当 iPhone 屏幕休眠/关闭时,手机仍在使用用户位置。那么是否有一个功能可以告诉我屏幕何时休眠,以便我可以停止更新位置?
@interface RideauAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
UIWindow *window;
UITabBarController *tabBarController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@end