I have two images, and I want to have the left one clipped so it looks like they are placed with a diagonal line in between. Like so:
I'm able to create the path and clip, but cannot figure out how to set the line width for just the right part...
My code:
let path = UIBezierPath()
path.moveToPoint(CGPoint(x: 0, y: 0))
path.addLineToPoint(CGPoint(x: leftContentView.frame.width, y: 0))
path.addLineToPoint(CGPoint(x: leftContentView.frame.width - 20, y: leftContentView.frame.height))
path.addLineToPoint(CGPoint(x: 0, y: leftContentView.frame.height))
path.closePath()
let mask = CAShapeLayer()
mask.path = path.CGPath
self.leftContentView.layer.mask = mask