I have recently been having some trouble with iOS 7 and unlocking. I am trying to get an UIAlertView to display every time a user unlocks his/her device.

I have gotten the same thing to work with respringing. I am using iOSOpenDev with the logos template. Does anyone know how to achieve an Alert right after unlocking with iOS 7's SBLockscreenViewController, or with something else?

有帮助吗?

解决方案

Check out these methods from SBLockScreenViewController:

-(void) prepareForUIUnlock;
-(void) finishUIUnlockFromSource:(int)source;

Both should work fine.

其他提示

Every time when your application becomes active the following action will be called:

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top