Created
September 4, 2014 10:13
-
-
Save redraiment/ec31dcb7b753f445a06c to your computer and use it in GitHub Desktop.
layer.cornerRadius for left only
This file contains hidden or 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
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_toggle.bounds | |
byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerBottomLeft) | |
cornerRadii:CGSizeMake(8.0, 8.0)]; | |
CAShapeLayer *maskLayer = [CAShapeLayer new]; | |
maskLayer.frame = _toggle.bounds; | |
maskLayer.path = maskPath.CGPath; | |
_toggle.layer.mask = maskLayer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment