FQScreenShot
一句代码保存截图,将View相关的页面保存为图片,支持 UIView,UIScrollView,UITableView,UICollection,UIWebView,WKWebView。支持iOS11
方法一:CocoaPods
- 1、
在Podfile文件里面添加:pod 'FQScreenShot'
- 2、:在对文件添加头文件
import FQScreenShot
//在需要截图的地方调用此方法
FQScreenShot.screenShot(yourView) { (shotImage) in
toDoSomething
}
方法二:手动添加
- 1、引入头文件
import FQScreenShot
- 2、使用以下方法
//在需要截图的地方调用此方法
FQScreenShot.screenShot(yourView) { (shotImage) in
toDoSomething
}