UITextField Only Top And Bottom Border

后端 未结 11 1001
温柔的废话
温柔的废话 2020-12-07 22:46

I currently have a regular border. I would like to only have a top and bottom border.

How do I accomplish this?

Using the UITextField<

11条回答
  •  旧时难觅i
    2020-12-07 23:28

    you can create one image that with top and bottom border and set it to the background of your UITextField :

    yourTextField.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"yourBorderedImageName"]];
    

提交回复
热议问题