Created
October 25, 2012 18:12
-
-
Save zsiegel/3954411 to your computer and use it in GitHub Desktop.
UIView Rounded Corner Mask
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
CAShapeLayer *layer = [CAShapeLayer layer]; | |
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerBottomLeft) cornerRadii:CGSizeMake(5.0, 5.0)]; | |
layer.path = path.CGPath; | |
self.layer.mask = layer; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment