小编the*_*ter的帖子

iPhone如何在iPhone屏幕睡眠时告诉应用程序

我正在制作一个使用用户位置的iPhone应用程序,但是我注意到当iPhone屏幕休眠/关闭时,手机仍在使用用户位置.那么是否有一个功能可以告诉我什么时候屏幕睡觉所以我可以stopUpdatingLocation?

@interface RideauAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
    UIWindow *window;
    UITabBarController *tabBarController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;

@end
Run Code Online (Sandbox Code Playgroud)

iphone sleep screen userlocation

3
推荐指数
1
解决办法
177
查看次数

标签 统计

iphone ×1

screen ×1

sleep ×1

userlocation ×1