Which method is called when device is about to be unlocked?

柔情痞子 提交于 2020-01-02 13:28:07

问题


I would like to know where the -(void)unlock (or whatever is called) used when we "slide to unlock" on the LockScreen is.

Has anyone an idea ?


回答1:


Try these

iOS 4 - 5

SBAwayController -(void)_finishedUnlockAttemptWithStatus:(char)

Argument will be non zero (I don't quite sure it will always be 1 when device is unlocked) when device is about to be unlocked.

iOS 6

SBAwayController -(void)_finishUnlockWithSound:(char) unlockSource:(int) isAutoUnlock:(char)

iOS 7

SBLockScreenViewController -(void)finishUIUnlockFromSource:(int)



回答2:


You can use by calling the method GSEventLockDevice (); from your application, and it can be found in GraphicsServices.framework.

From here you can get more idea : how to lock Iphone by programmatically



来源:https://stackoverflow.com/questions/21877623/which-method-is-called-when-device-is-about-to-be-unlocked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!