禁用iPhone - 仅查看锁定屏幕

时间:2016-09-12 16:33:44

标签: ios swift

在Swift中是否有禁用iPhone或只允许在满足某个条件时使用某些功能?

例如:

if (phoneIsOnAndUnlocked == true){
    // some kind of command to disable or lock the device for a 
    //time or button is pressed

    Device.lockDevice = true

    if(homeButton.pressed.numberOfPresses == 2) {
        Device.lockDevice = false
    }
}
else {
    //Device is still running
}

0 个答案:

没有答案