Text inset for UITextField?

I would like to inset the text of a UITextField. Is this possible? 31 Answers 31 Overriding -textRectForBounds: will only change the inset of the placeholder text. To change the inset of the editable text, you need to also override -editingRectForBounds: // placeholder position – (CGRect)textRectForBounds:(CGRect)bounds { return CGRectInset(bounds, 10, 10); } // text position … Read more

iPhone UITextField – Change placeholder text color

I’d like to change the color of the placeholder text I set in my UITextField controls, to make it black. I’d prefer to do this without using normal text as the placeholder and having to override all the methods to imitate the behaviour of a placeholder. I believe if I override this method: – (void)drawPlaceholderInRect:(CGRect)rect … Read more

How can I make a UITextField move up when the keyboard is present – on starting to edit?

With the iOS SDK: I have a UIView with UITextFields that bring up a keyboard. I need it to be able to: Allow scrolling of the contents of the UIScrollView to see the other text fields once the keyboard is brought up Automatically “jump” (by scrolling up) or shortening I know that I need a … Read more