-
-
Save gliubc/352d97c3f33688d3668d44b6e49a751d to your computer and use it in GitHub Desktop.
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
- (void)layoutSubviews { | |
[super layoutSubviews]; | |
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.shopLabel.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)]; | |
CAShapeLayer *shape = [CAShapeLayer new]; | |
[shape setPath:maskPath.CGPath]; | |
self.shopLabel.layer.mask = shape; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment