0

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?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    http://stackoverflow.com/questions/21877623/which-method-is-called-when-device-is-about-to-be-unlocked/21879327#21879327 – creker Apr 15 '14 at 14:04

2 Answers2

1

Check out these methods from SBLockScreenViewController:

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

Both should work fine.

s1ris
  • 101
  • 7
  • Thank you so much! You just saved me hours more of trying to hunt down the right methods.. – taysamjiggly Apr 15 '14 at 16:51
  • @taysamjiggly, did you read my comment? Your question is already been answered. – creker Apr 15 '14 at 17:09
  • @creker I saw your comment and I tried it, but it left out the (source) part and my tweak was coming up with errors. I figured it out and thanks for your comment! – taysamjiggly Apr 15 '14 at 21:11
0

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.
}
Cœur
  • 37,241
  • 25
  • 195
  • 267
Szu
  • 2,254
  • 1
  • 21
  • 37