Created
February 20, 2013 22:34
-
-
Save scottmkroberts/5000305 to your computer and use it in GitHub Desktop.
Multiple Rounded corners with UIBezierPath using the | character
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the path (with only the top-left corner rounded) | |
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_categoryColorView.bounds | |
byRoundingCorners:UIRectCornerTopLeft | | |
UIRectCornerBottomLeft | |
cornerRadii:CGSizeMake(10.0, 10.0)]; | |
// Create the shape layer and set its path | |
CAShapeLayer *maskLayerTop = [CAShapeLayer layer]; | |
maskLayerTop.frame = _categoryColorView.bounds; | |
maskLayerTop.path = maskPath.CGPath; | |
_categoryColorView.layer.mask = maskLayerTop; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment