0
下面的代碼生成以下效果:UIBezierPath - 斯威夫特2
let path = UIBezierPath()
path.moveToPoint(CGPoint(x: 0, y: 0))
path.addLineToPoint(CGPoint(x: headerRect.width, y: 0))
path.addLineToPoint(CGPoint(x: headerRect.width, y: headerRect.height))
path.addLineToPoint(CGPoint(x: 0, y: headerRect.height-headerCutAway))
headerMaskLayer?.path = path.CGPath
我想改變它,這樣的三角形是在右邊,而左邊,我該怎麼辦那?
它完美!非常感謝你,@Rob! – aghanim