As I am converting my code to swift 3, I got this error:
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?)
I have no idea how to use clip(using:) and I don't see any documentation relating to it. Any ideas. Thanks Reza
In swift3 CGContextEOClip
and CGContextClip
are now methods of CGContext
type
let context = /*your context*/
context.clip(using: .evenOdd) // for CGContextEOClip
context.clip(using: .winding) // for CGContextClip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With