以编程方式自动锁定iphone / ipad [英] auto-lock iphone/ipad programmatically

查看:152
本文介绍了以编程方式自动锁定iphone / ipad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在应用程序运行时强制用户自动锁定(也许可能是密码锁定)(主要是出于安全原因)?如果我们无法以编程方式设置它们,我们是否可以至少检查它们是否已设置?

Is there a way to 'force' the user to have auto-lock (and maybe passcode lock) on while the application is running (for security reasons mainly)? If we can't set them programmatically, can we at least check to see if they are set?

谢谢,
Mihai

Thanks, Mihai

推荐答案

你可以使用一个会话处理程序类,它继承自UIApplication并修复一个计时器。
这很简单,完全可以自定义。

YOu can use a Session handler class which inherits from UIApplication and fix a timer.. Thats very easy and fully customizable.

这篇关于以编程方式自动锁定iphone / ipad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆