When setting the keyboard in IB or programatically as below for a UITextField.
[textFieldOutlet setKeyboardType:UIKeyboardTypeEmailAddress];
The keyboard has an Emoji icon which means you can type in Emoji's in an email address (which is a bit rubbish). Can this be disabled? I understand I can change the type to ASCIICapable but then I do not have the easy access to @ and . signs.
I have worked around it with this which just stops the Emoji being entered but the button is still there (Credit Here with MeganZhou answer).
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if ([textField isFirstResponder])
{
if ([[[textField textInputMode] primaryLanguage] isEqualToString:@"emoji"] || ![[textField textInputMode] primaryLanguage])
{
return NO;
}
}
return YES;
}
I have also noted that the icon is there when you are typing an email address in Mail too.
This is iOS8 but may also be in earlier version.
Select the virtual keyboard you're using (like Gboard, and not “Google voice typing”) and then Preferences. (There's a shortcut to this location, too: With virtual keyboard displayed, tap and hold on the comma [,] key until you see a small Settings gear appear.) Now, disable the option “Show emoji switch key.”
Steps to Disable Emoji Bar on GBoardStart typing and once you see the emoji bar, swipe left on it. You will see a Remove Bar button, tap on it and it will take you to settings. Here you can disable the Emoji fast-access bar toggle to disable that emoji bar completely.
Just swipe left on the emoji bar and you would see the option to disable “Remove Bar“.
User have to follow below steps if he wants to get rid of emoji button.
This will remove the emoji button and user can also have easy access to @ and . signs.
Note
:- For security reasons, iOS does not allow programmers to remove keyboard programatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With