mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix bug that keyboard type is not changed when using passward on iOS (#1315)
This commit is contained in:
@@ -174,18 +174,22 @@ namespace
|
||||
void setTexFiledKeyboardType(UITextField* textField, const std::string& inputType)
|
||||
{
|
||||
if (0 == inputType.compare("password"))
|
||||
{
|
||||
textField.secureTextEntry = TRUE;
|
||||
else
|
||||
textField.secureTextEntry = FALSE;
|
||||
|
||||
if (0 == inputType.compare("email"))
|
||||
textField.keyboardType = UIKeyboardTypeEmailAddress;
|
||||
else if (0 == inputType.compare("number"))
|
||||
textField.keyboardType = UIKeyboardTypeDecimalPad;
|
||||
else if (0 == inputType.compare("url"))
|
||||
textField.keyboardType = UIKeyboardTypeURL;
|
||||
else if (0 == inputType.compare("text"))
|
||||
textField.keyboardType = UIKeyboardTypeDefault;
|
||||
}
|
||||
else
|
||||
{
|
||||
textField.secureTextEntry = FALSE;
|
||||
if (0 == inputType.compare("email"))
|
||||
textField.keyboardType = UIKeyboardTypeEmailAddress;
|
||||
else if (0 == inputType.compare("number"))
|
||||
textField.keyboardType = UIKeyboardTypeDecimalPad;
|
||||
else if (0 == inputType.compare("url"))
|
||||
textField.keyboardType = UIKeyboardTypeURL;
|
||||
else if (0 == inputType.compare("text"))
|
||||
textField.keyboardType = UIKeyboardTypeDefault;
|
||||
}
|
||||
}
|
||||
|
||||
void setTextFieldReturnType(UITextField* textField, const std::string& returnType)
|
||||
|
||||
Reference in New Issue
Block a user