auto-lock iphone/ipad programmatically
问题 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? Thanks, Mihai 回答1: if ([UIApplication sharedApplication].idleTimerDisabled == YES) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Please enable auto-lock"...]; [alert show]; [alert release]; } else { /* some code */ } The above snippet will check to see