开发者

iOS power button, can the event of touching it be determined?

I'd like to know if there's a way to determine if the power button was hit to "clos开发者_运维技巧e" the screen on the device.

Is there a way to determine this? I cannot use private api's.


I don't think you can tell if the button is pressed directly without using private APIs, however you might be able to use the applicationWillResignActive: method of the UIApplicationDelegate protocol to do what you need to do.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜