最佳答案
默认情况下,您可以将 BorderStyle
属性设置为 Bezel
as
myTextField.borderStyle = UITextBorderStyle.Bezel
myTextField.layer.cornerRadius = 5
myTextField.backgroundColor = UIColor.lightGrayColor() //Any Color you want
但是如果你想给出图片显示的效果,你需要自定义UITextField
关于ios - 我怎样才能使我的 uitextfield 看起来像塌陷?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38220390/