0

I want to take a screenshot of the whole view that the user is seeing. I want to achieve the same result as pressing the lock and home button programmatically.

I know there are a lot of questions like mine, but they all require me to input a specific view. What about all the views?

jscs
  • 63,694
  • 13
  • 151
  • 195
BalestraPatrick
  • 9,944
  • 4
  • 30
  • 43

1 Answers1

1

There is a good example on how to take a screenshot at TLB Tech Entries. The code shows you how to define the dimensions of the screen, create the snapshot, put the entire view into the snapshot and save the subsequent image to a photo album.

You can also refer back to the Apple's UIKit framework for more details on the commands used.

sangony
  • 11,636
  • 4
  • 39
  • 55