Created
November 11, 2015 02:33
-
-
Save joaoBeno/46261c5802b2a007f776 to your computer and use it in GitHub Desktop.
Setar bordas customizadas no botão...
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
UIBezierPath *shapePathFB = [UIBezierPath bezierPathWithRoundedRect:self.btnSampleOutlet.bounds | |
byRoundingCorners:UIRectCornerTopRight | UIRectCornerBottomRight | |
cornerRadii:CGSizeMake(7.0, 7.0)]; | |
CAShapeLayer *shapeLayerFB = [CAShapeLayer layer]; | |
shapeLayerFB.frame = self.btnSampleOutlet.bounds; // Why set bounds? My btn has bounds already... | |
shapeLayerFB.path = shapePathFB.CGPath; | |
shapeLayerFB.fillColor = [UIColor clearColor].CGColor; | |
shapeLayerFB.strokeColor = [UIColor blackColor].CGColor; | |
shapeLayerFB.lineWidth = 1; | |
[self.btnSampleOutlet.layer addSublayer:shapeLayerFB]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment