Created
February 17, 2014 17:50
-
-
Save jeffbailey/9055516 to your computer and use it in GitHub Desktop.
Depending on your background it may be necessary mask the background of a UISegmentedControl in iOS 7.
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* mask = [[CAShapeLayer alloc] init]; | |
mask.frame = CGRectMake(0, 0, segmentedControl.bounds.size.width-1, segmentedControl.bounds.size.height); | |
mask.path = [[UIBezierPath bezierPathWithRoundedRect:mask.frame cornerRadius:4] CGPath]; | |
segmentedControl.layer.mask = mask; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment