iOS根据视图尺寸获取视图截屏【View Snapshots】how do I take a snapshot of my view and save the result in a UIImage?
文章目录
- 引言
- I 、根据视图尺寸获取视图截屏
- 1.1 用法
- 1.2 核心代码
- 1.3 demo源码
- II、案例
- see also
引言
原文:
https://kunnan.blog.csdn.net/article/details/113181607
本文的方案获取的截图内容不包含_UIAlertControllerShimPresenterWindow 和AlertView
截图内容包含AlertView和AlertControl的请看看这篇https://kunnan.blog.csdn.net/article/details/113444297
方式一:
调用某个view的layer的renderInContext:
方法即可
有时导航条无法正常获取
-
还没有评论,来说两句吧...