I need to know if the user is trying to take a screen capture of a specific section on an app we are building. Any advice would be helpful. We would like to then black out the screen to prevent a screen shot from being taken.
preguntado el 01 de febrero de 12 a las 14:02
You cann't control Home and Switch buttons actions. It is the default hardware behaviour.
I also believe it to be impossible to detect.
I did a few tests, thinking that the iOS might call
-(void) applicationDidEnterBackground:(UIApplication*)application or
- (void)applicationWillResignActive:(UIApplication *)application
might be called, but
NSLogs in those methods weren't called when I took a screenshot.
I did find this but it's also not available in iOS 5.0+. (perhaps even not after iOS 4.0+)
The PictureWasTakenNotification Darwin notification will be sent when the user takes a screenshot. However, this is sent after the screenshot is taken.