【发布时间】:2017-05-20 08:52:29
【问题描述】:
【问题讨论】:
【问题讨论】:
扩展 UIView {
public func toImage () -> UIImage {
UIGraphicsBeginImageContextWithOptions(bounds.size, isOpaque, 0.0)
drawHierarchy(in: bounds, afterScreenUpdates: false)
let img = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return img!
}
}
【讨论】: