Reputation: 27225
I know that we can call GSEventLockDevice ();
from the GraphicsServices.framework
to lock the screen in iOS 6
and older version, as explained by H2CO3 Here. But unfortunately it's not working in iOS 7
.
My Question :
How to lock the iPhone Screen programmatically in iOS 7
?
Note : I don't want this for Appstore.
Upvotes: 8
Views: 3438
Reputation:
Cant you disable all the UIGestureRecognizers
for the view? I do it for buttons all the time. It is the 'enabled' property for UIButtons
. Im sure you can use something like this to achieve satisfactory results. For the view I think it is userInteractionEnabled
property for views. Set your view userInteractionEnabled
property to NO with a UISwitch
.
Upvotes: 0
Reputation: 21
Hi it's not possible in iOS7. You need special entitlement so until there will be a jailbreak you are out of luck
Upvotes: 1