Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indentation in UITextField

For example, I want the "test" text a little bit right, what property should I set?

UITextView indentation problem:

For example, I want the "test" text a little bit right, what property should I set?

like image 338
Ben Lu Avatar asked May 23 '12 15:05

Ben Lu


1 Answers

Try this

    UIView *paddingView           = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 20)];
    self.yourtextField.leftView             = paddingView;
    self.yourtextField.leftViewMode         = UITextFieldViewModeAlways;
like image 68
Piyush Kashyap Avatar answered Sep 28 '22 00:09

Piyush Kashyap