Created
January 12, 2011 17:41
-
-
Save digidigo/776532 to your computer and use it in GitHub Desktop.
Category to allow customization of the placeholder in an UITextField
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
#import <Foundation/Foundation.h> | |
@interface UITextField (ColoredPlaceholder) | |
@end |
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
#import "UITextField+ColoredPlaceholder.h" | |
#import "AppStyle.h" | |
@implementation UITextField (ColoredPlaceholder) | |
- (void) drawPlaceholderInRect:(CGRect)rect { | |
[[AppStyle placeHolderTextColor] setFill]; | |
[[self placeholder] drawInRect:rect withFont:self.font]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment