How to take a screenshot programmatically on iOS

前端 未结 20 2365
一生所求
一生所求 2020-11-22 01:42

I want a screenshot of the image on the screen saved into the saved photo library.

20条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 02:16

    For iOS 7.0 or above..

    If you want to take screenshots of view say(myView), you can do this with single line:

    [myView snapshotViewAfterScreenUpdates:NO];
    

提交回复
热议问题