Permalink
Browse files

don't set the title shadow color to nothing

  • Loading branch information...
1 parent 9a7ba10 commit 942c021ef0c46d9843e8ac88304b393eaf310fdd @joshaber joshaber committed May 18, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/UIKit/TUIButton.m
View
@@ -207,7 +207,12 @@ - (void)drawRect:(CGRect)r
_titleView.text = self.currentTitle;
_titleView.textColor = self.currentTitleColor;
- _titleView.renderer.shadowColor = self.currentTitleShadowColor;
+ TUIColor *shadowColor = self.currentTitleShadowColor;
+ // they may have manually set the renderer's shadow color, in which case we
+ // don't want to reset it to nothing
+ if(shadowColor != nil) {
+ _titleView.renderer.shadowColor = shadowColor;
+ }
CGContextRef ctx = TUIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);

0 comments on commit 942c021

Please sign in to comment.