Reputation: 811
I'm learning my way through UIBezierPaths by creating a table from scratch, and having individual cells filled with different colours.
This is a custom object I'm building which is contained in a subclassed UIView.
At the moment, I'm constructing this in this order:
As the picture suggests, I'm having trouble getting rid of the sharp corner of the cell fill outside the orange rounded rectangle.
Can anyone point me in the right direction to get rid of these?
Cheers! :)
Upvotes: 2
Views: 546
Reputation:
At the beginning of your drawing code you should add the outer rounded rect path to the clipping path using its addClip
method. That way nothing will get drawn that is outside this path.
Upvotes: 2