你可以在UITextField对象上设置keyboardAppearance属性为UIKeyboardAppearanceAlert:myTextField.keyboardAppearance = UIKeyboardAppearanceAlert;