I wonder if there is a way to take a screenshot of current view screen with everything on it - navigationbar, content, tabbar - but except the statusbar, is there a way to do that?
Asked
Active
Viewed 4,520 times
2
-
2I believe there is not. However, you can take the screenshot and then crop the image. – PengOne Mar 20 '12 at 01:05
-
possible duplicate of [How Do I Take a Screen Shot of a UIView?](http://stackoverflow.com/questions/2214957/how-do-i-take-a-screen-shot-of-a-uiview) – jtbandes Mar 20 '12 at 14:15
2 Answers
2
As suggested in the comments, the best way I know to go about this is to take a screenshot and then use the graphical context parameters to crop out only the portion of what you need.
Check this: Adjusting size of in app screenshot
Above question has an answer (by me:) ) to crop out the navbar and the tabbar, but you can modify it to crop out whatever portion you need.
0
I guess you could begin a new image context, draw the main view controller's view to that context, get an UIImage from that context, close that context, and you'd end up with a screenshot of the main view controller's view, which should have everything you wanted in your screenshot.

EmilioPelaez
- 18,758
- 6
- 46
- 50
-
That's what I had, but it's really depend on how your view controller got setup initially. In my case, the navitionbar and tabbar would miss in the final image although they are there on the screen. That's why I am looking for a "consistent" way of solving the problem – tom Mar 20 '12 at 01:47
-
That's funny. What kind of view controller is your root view controller? Also, does that part appear white or is it the content that should be below (if any)? – EmilioPelaez Mar 20 '12 at 03:45