1

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.

3 Answers3

1

No. Its not possible to find out.

Vignesh
  • 10,205
  • 2
  • 35
  • 73
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.

[source]

Community
  • 1
  • 1
James Webster
  • 31,873
  • 11
  • 70
  • 114
  • 2
    What 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
  • can you tell me something about darwing notification – Sunil Pandey Jan 08 '13 at 08:59