【发布时间】:2017-03-10 12:04:59
【问题描述】:
我正在编写代码来绘制图像图案,但对于函数 CGContext.saveGState(),我收到错误,因为 Expression 解析为未使用的函数。
任何人都可以帮助在 swift 3.0 中编写相同的内容。下面是代码sn-p:
UIGraphicsBeginImageContext(view.frame.size)
tempImageView.image?.draw(in: CGRect(x: 0, y: 0, width: view.frame.size.width, height: view.frame.size.height))
let context = UIGraphicsGetCurrentContext()
CGContext.saveGState(context!)
提前致谢
【问题讨论】: