Created
April 23, 2013 20:56
-
-
Save sneakyness/5447324 to your computer and use it in GitHub Desktop.
UITextField subclass alignment overrides
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
- (CGRect) textRectForBounds: (CGRect) bounds | |
{ | |
CGRect origValue = [super textRectForBounds: bounds]; | |
return CGRectOffset(origValue, 0.0f, 8.0f); | |
} | |
- (CGRect) editingRectForBounds: (CGRect) bounds | |
{ | |
CGRect origValue = [super textRectForBounds: bounds]; | |
return CGRectOffset(origValue, 0.0f, 8.0f); | |
} | |
- (CGRect) rightViewRectForBounds:(CGRect)bounds | |
{ | |
CGRect origValue = [super rightViewRectForBounds: bounds]; | |
return CGRectOffset(origValue, -6.0f, 0.0f); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment