Skip to content

Instantly share code, notes, and snippets.

@zsiegel
Created October 25, 2012 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsiegel/3954411 to your computer and use it in GitHub Desktop.
Save zsiegel/3954411 to your computer and use it in GitHub Desktop.
UIView Rounded Corner Mask
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