現在、私は小さな問題を抱えています。下のコードは、私のtableViewHeaderの上に三角形のレイヤーを出力しますが、bazierパスのカット方向を反転したいと思います。UIBezierPath Triangle reverse
コード:
let cutDirection = UIBezierPath()
cutDirection.move(to: CGPoint(x: 0, y: 0))
cutDirection.addLine(to: CGPoint(x: headerRect.width, y: 0))
cutDirection.addLine(to: CGPoint(x: headerRect.width, y: headerRect.height))
cutDirection.addLine(to: CGPoint(x: 0, y: headerRect.height - headerCut))
newHeaderLayer.path = cutDirection.cgPath
出力:私は探しています
結果:
ありがとうございました!
ケビン。
あなたの質問は何ですか? – rmaddy
@rmaddyカットディレクションを逆にしたい。既に修正済み! –
あなたが望むのははっきりしていました。しかしあなたの質問はそうではありませんでした。 – rmaddy