marcus
marcus

Reputation: 10086

Padding in UITextField

Is it possible to set padding inside a UITextField, if so how?

Upvotes: 4

Views: 5321

Answers (1)

Daniel Krzyczkowski
Daniel Krzyczkowski

Reputation: 3157

I was also wondering, here you are:

UIView paddingView = new UIView(new CGRect(0, 0, 5, 20));
YourTextField.LeftView = paddingView;
YourTextField.LeftViewMode = UITextFieldViewMode.Always;

You can modify padding size of course by changing values above.

Hope this will help.

Upvotes: 5

Related Questions