您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页ios中的屏幕截图(UIView方法)

ios中的屏幕截图(UIView方法)

来源:伴沃教育
  • (UIView *)snapshotViewAfterScreenUpdates:(BOOL)afterUpdates ;
  • (UIView *)resizableSnapshotViewFromRect:(CGRect)rect afterScreenUpdates:(BOOL)afterUpdates withCapInsets:(UIEdgeInsets)capInsets ;
  • (BOOL)drawViewHierarchyInRect:(CGRect)rect afterScreenUpdates:(BOOL)afterUpdate
    (uiview中的快照的介个方法)
一个简单的事例

self.snapImageView = (UIImageView*) [self.view snapshotViewAfterScreenUpdates:true];(简单)
这个方法直接就可以获取到截取的图片,然后就可以用来实现设置相应的内容。

可参考的链接

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务