[英]How to remove border of UITextField in navigationbar
我想刪除導航欄中的 UItextField 邊框。 我已經瀏覽了這個鏈接,但它不起作用。 (我制作了一個示例應用程序並在 ViewConroller 上添加了 UItextField 所以它工作正常)
是否要去除 UITextView 或 UITextField 的邊框? 如果你想在 textField 中刪除它,試試這個:
textField.borderStyle = UITextBorderStyleNone;
嘗試這個:
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()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.