4
私が(図C)あなたが私のスクリーンショットで見ることができるようにだけ丸みを帯びた角を描画するために、2 UIBezierPath(スクリーンショットを参照)との違いを描きたい描画の違い
私ですコード:
let context = UIGraphicsGetCurrentContext()
CGContextSaveGState(context)
let rectanglePath = UIBezierPath(rect: rect)
CGContextAddPath(context, rectanglePath.CGPath)
CGContextEOClip(context)
let roundedRectanglePath = UIBezierPath(roundedRect: productRect, byRoundingCorners: roundedCorners, cornerRadii: CGSize(width: 6, height: 6))
CGContextAddPath(context, roundedRectanglePath.CGPath)
CGContextFillPath(context)
CGContextRestoreGState(context)
残念ながら、それは動作しません。私は丸い黒い四角形を描画します。
アイデアはありますか?
ありがとうございます。
これは完璧です!ありがとうRob。 – thierryb