[英]UIAlertController TextField BorderStyle, IOS
i created a UIAlertController and within the AlertController i added a UITextfield, and i want it without any kind of borders around. 我创建了一个UIAlertController,并在AlertController中添加了一个UITextfield,我希望它周围没有任何边界。 There is an image below with the borders, and i would like to delete that square border.
下面是带有边框的图像,我想删除该正方形边框。
I would like to end up with a non-border TextField, and the only thing you could see is the text you are typing. 我想以一个无边界的TextField结尾,您唯一看到的就是您正在键入的文本。 Something like this:
像这样:
On the part that u add the textfield, u can set its properties. 在添加文本字段的部分,您可以设置其属性。
alert.addTextField { (textField) in
textField.placeholder = "Bla sheep"
textField.borderStyle = .none //remove borders
textField.backgroundColor = .clear //transparent background
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.