Reputation: 1699
I have two text fields, for username and password. I created designs for both uitextfield
using the layer property.
When enter some text, values are displayed starting from the edge like below:
Is there any possible to move that username slightly to the right as a starting point for uitextfield
?
Thanks
Upvotes: 0
Views: 138
Reputation: 82
UIView *paddingView_textFieldFullName = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 35)];
yourTextFieldName.leftView = paddingView_textFieldFullName;
yourTextFieldName.leftViewMode = UITextFieldViewModeAlways;
yourTextFieldName.text = @"";
yourTextFieldName.delegate=self;
try this code, I hope helps to you.
Upvotes: 0
Reputation: 580
UITextField Class Reference, this class has a overlay views inside it like leftView and rightView so just create a blank view and add it to your textField's leftView.
Also you can check these. UITextfield leftView/rightView padding on iOS7
Upvotes: 1