在将我的代码转换为Swift 3时,我遇到了这个错误:
error: 'CGContextEOClip' is unavailable: Use clip(using:)
CGContextEOClip(context!);
^~~~~~~~~~~~~~~
CoreGraphics.CGContextEOClip:2:13: note: 'CGContextEOClip' has been explicitly marked unavailable here
public func CGContextEOClip(_ c: CGContext?)
我不知道如何使用clip(using:),也没有看到任何相关的文档。有什么想法吗?谢谢,Reza。
CGContextEOClip
和CGContextClip
,这两个函数曾经用于剪切时可能出现的两种不同填充规则,现在已经合并为一个方法,并接受一个填充规则参数。 - rickster