这是我的代码:
let alertController = UIAlertController(title: alertTitle.security, message: "", preferredStyle: UIAlertController.Style.alert)
alertController.addTextField { (textField : UITextField!) -> Void in
textField.placeholder = placeholder.security
textField.tintColor = .black
textField.isSecureTextEntry = true
}
我想防止一些特殊字符插入UITextField
.