Skip to content

Instantly share code, notes, and snippets.

@psobko
Created October 4, 2013 22:31
Show Gist options
  • Save psobko/6833930 to your computer and use it in GitHub Desktop.
Save psobko/6833930 to your computer and use it in GitHub Desktop.
//H
@interface UITextField(UITextFieldCategory) {
}
- (CGRect)editingRectForBounds:(CGRect)bounds;
- (CGRect)textRectForBounds:(CGRect)bounds;
@end
//M
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
@implementation UITextField(UITextFieldCategory)
- (CGRect)textRectForBounds:(CGRect)bounds{
return CGRectInset( bounds, 10 , 0);
}
- (CGRect)editingRectForBounds:(CGRect)bounds{
return CGRectInset( bounds, 10 , 0);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment