Hacker News new | ask | show | jobs
by 0x0 4540 days ago
It looks like the trick here is to hook into a global NSNotification called "UIApplicationWillBeginSuspendAnimationNotification", which is assumed to be "app will enter background", and then throw up a fullscreen UIView on top of everything.

I think this is an undocumented notification, so it's possible other iOS versions will break this feature.

1 comments

I can't find it at the moment, but I think there is a supported way to achieve the same thing. I remember it being mentioned at WWDC to allow apps to hide sensitive data in the UI before the screenshot for the app switcher is taken.
Yes I remember that as well, all you have to do is set the UI you want to be screenshotted in the applicationWillEnterBackground notification/application delegate callback. This has been around since fast app switching (iOS 2.3 I think, the golden old days :)) but has gotten much more prominent with the new app switcher.
Yes, 1Password does this. If you have it unlocked, and then switch to another app, then switch back, the thumbnail is the lock screen, even though that's not the last thing you had onscreen.