Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个计时器(使用 NSTimer),当它触发时,Iphone 将自行锁定。
或者至少关闭屏幕。
有什么办法吗?
有一个 GraphicsServices 框架和一个GSEventLockDevice();锁定设备的功能,但它没有记录(私有框架)并且很可能被 Apple 拒绝。但如果您不打算提交到 App Store,这是一个选项。
GSEventLockDevice();