方法声明:
- (nullable UIView *)resizableSnapshotViewFromRect:(CGRect)rect afterScreenUpdates:(BOOL)afterUpdates withCapInsets:(UIEdgeInsets)capInsets NS_AVAILABLE_IOS(7_0);
这个方法就是根据frame去截图,然后返回一个view。并且支持拉伸与缩放。
withCapInsets -> 这个和拉伸图片的image.resizableImageWithCapInsets()使用一样
具体参照Apple官方文档。

博客介绍了iOS中UIView的一个截图方法,该方法可根据frame截图并返回一个view,支持拉伸与缩放。还提到withCapInsets的使用和拉伸图片的image.resizableImageWithCapInsets()一样,可参照Apple官方文档。
3967

被折叠的 条评论
为什么被折叠?



