Permalink
Browse files

Edit corner radius in CBLayer and CBBezier

  • Loading branch information...
1 parent b6b7177 commit 9bd7d78055ec3df9277493e3b78a8b24747d896e Reda Lemeden committed Nov 16, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 Custom UIButtons/CBBezier.m
  2. +2 −2 Custom UIButtons/CBLayer.m
@@ -47,7 +47,7 @@ - (void)drawRect:(CGRect)rect
// Draw rounded rectangle bezier path
- UIBezierPath *roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(0, 0, 280, 37) cornerRadius: 4];
+ UIBezierPath *roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(0, 0, 280, 37) cornerRadius: 5];
// Use the bezier as a clipping path
[roundedRectanglePath addClip];
@@ -63,7 +63,7 @@ - (void)drawRect:(CGRect)rect
[roundedRectanglePath stroke];
// Draw Inner Glow
- UIBezierPath *innerGlowRect = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(1.5, 1.5, 277, 34) cornerRadius: 2.5];
+ UIBezierPath *innerGlowRect = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(1.5, 1.5, 277, 34) cornerRadius: 4];
[innerGlow setStroke];
innerGlowRect.lineWidth = 1;
[innerGlowRect stroke];
@@ -69,7 +69,7 @@ - (void)drawButton
// Get the root layer (any UIView subclass comes with one)
CALayer *layer = self.layer;
- layer.cornerRadius = 4.5f;
+ layer.cornerRadius = 5;
layer.borderWidth = 1;
layer.borderColor = [UIColor colorWithRed:0.77f green:0.43f blue:0.00f alpha:1.00f].CGColor;
}
@@ -125,7 +125,7 @@ - (void)drawInnerGlow
// Instantiate the innerGlow layer
_innerGlow = [CALayer layer];
- _innerGlow.cornerRadius= 4.5f;
+ _innerGlow.cornerRadius= 4;
_innerGlow.borderWidth = 1;
_innerGlow.borderColor = [[UIColor whiteColor] CGColor];
_innerGlow.opacity = 0.5;

0 comments on commit 9bd7d78

Please sign in to comment.