I want to remove UItextField Border which is in navigationbar. I've gone through this link, but it is not working. (I made a sample app and added UItextField on ViewConroller so it is working fine)
Asked
Active
Viewed 332 times
-1
-
did you try `textfield.layer.borderWidth = 0` – kamwysoc Jan 07 '17 at 13:19
-
Yes but border still display. – ajit jogi Jan 07 '17 at 13:22
-
Post your UI screenshot. – dahiya_boy Jan 07 '17 at 14:04
2 Answers
0
Do you want to remove the border of UITextView or UITextField? If you want to remove it in a textField just try this:
textField.borderStyle = UITextBorderStyleNone;

Gulliva
- 488
- 2
- 10
0
Try this:
textField = subview as! UITextField
textField.borderStyle = .None
textField.layer.borderWidth = 1
textField.layer.borderColor = UIColor.lightGrayColor().CGColor
textField.layer.cornerRadius = 14
textField.background = nil;
textField.backgroundColor = UIColor.whiteColor()

Mutawe
- 6,464
- 3
- 47
- 90