문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top