From 60173df79322a3a21983fb439b9db117ebba22f1 Mon Sep 17 00:00:00 2001 From: Reda Lemeden Date: Fri, 12 Oct 2012 19:53:23 +0000 Subject: [PATCH] Refactor innerGlowFrame --- Custom UIButtons/CBLayer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Custom UIButtons/CBLayer.m b/Custom UIButtons/CBLayer.m index 431529b..147a043 100644 --- a/Custom UIButtons/CBLayer.m +++ b/Custom UIButtons/CBLayer.m @@ -161,7 +161,7 @@ - (void)drawInnerGlow _innerGlow = [CALayer layer]; // Set the frame (1pt inset) - CGRect innerGlowFrame = CGRectMake(CGRectGetMinX(self.bounds)+1, CGRectGetMinY(self.bounds)+1, CGRectGetWidth(self.bounds)-2, CGRectGetHeight(self.bounds)-2); + CGRect innerGlowFrame = CGRectInset(self.bounds, 1, 1); _innerGlow.frame = innerGlowFrame; _innerGlow.cornerRadius= 4.5f;