0%

根据view生成图片的笔记

1
2
3
4
5
UIGraphicsBeginImageContext(view.frame.size)
let context = UIGraphicsGetCurrentContext()
self.view.layer.renderInContext(context!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

欢迎关注我的其它发布渠道