0

I was wondering if there was a specific method called when we press the 2 buttons of the iPhone (using Home-Button & Power on/off) to take a screenshot. If yes, I would known his name to use her in programming.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Volg
  • 13
  • 4

3 Answers3

0

It is a system level service for which the app never receives any notification or method call.

bbum
  • 162,346
  • 23
  • 271
  • 359
  • Too bad for me, it was to answered at this question : [link](http://stackoverflow.com/questions/5947135/take-a-screenshot-from-the-camera-view) – Volg May 12 '11 at 15:11
0

I believe that would be a native method, not accessible from the IPhone SDK. In what context are you going to be using this? You might be looking for this - Take screenshot from code

Community
  • 1
  • 1
Caleb Jares
  • 6,163
  • 6
  • 56
  • 83
0

There used to be a UIGetScreenImage() function that you could use to capture the screen. Apple no longer allows use of that function in App Store apps, so you have a few other options. CALayer has a -renderInContext: method—Google it—that you can use to copy a view’s contents to a graphics context; this does not, however, work for OpenGL content, video, or live imagery from a device’s camera. I’m not sure about solutions for the first two, but for the latter—getting images from the camera—you’ll need to use the AVFoundation framework.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131