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.
Asked
Active
Viewed 1,155 times
1
-
1Good question, but my curiosity begs me to ask what you want to stop them taking screen shots of? – James Webster Feb 01 '12 at 14:43
3 Answers
0
You cann't control Home and Switch buttons actions. It is the default hardware behaviour.

beryllium
- 29,669
- 15
- 106
- 125
0
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.

Community
- 1
- 1

James Webster
- 31,873
- 11
- 70
- 114
-
2What about this? Do this- set up a program, run a debug, and watch the events that pass through the debug. What we believe is that once you hit the screen capture buttons, it invokes a command and a call to action on the viewer to transform the transparent PNG to an opaque PNG. The opaque PNG is what the screen capture captures and is what you would see in your photo files. This is for the viewer portion of the app we will build as well. – Jimmy Smith Feb 01 '12 at 17:47
-