我创建了一个UIAlertController,在AlertController中我添加了一个UITextfield,我希望它没有任何类型的边框。 下面有一个带边框的图片,我想删除那个方形边框。
我想最终得到一个非边框的TextField,你唯一能看到的就是你输入的文字。像这样:
答案 0 :(得分:0)
在你添加文本字段的部分,你可以设置它的属性。
alert.addTextField { (textField) in
textField.placeholder = "Bla sheep"
textField.borderStyle = .none //remove borders
textField.backgroundColor = .clear //transparent background
}