-1

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)

How to hide UITextField border?

Cannot remove border of UITextField dynamically

Community
  • 1
  • 1
ajit jogi
  • 1
  • 1

2 Answers2

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