I want to change keyboard type from default to numeric after user pressed return button. However after setting keyboardType property nothing happens.
My code:
-(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation]; return YES; }
I have set myself as text field delegate and the method is being called after pressing return button.
EDIT: Solved by
-(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation]; [textField reloadInputViews]; return YES; }
No this is not possible - user can only change their language in the settings. You can change keyboard directly on the keyboard by pressing "globe icon" on the bottom row. First, you have to enable those language for input in Settings. Then pressing the globe button on the keyboard would toggle between those languages.
Open Microsoft SwiftKey. Tap 'Languages' Ensure that both of your enabled languages have the a different layout selected (i.e QWERTY & AZERTY) Press and hold the spacebar and slide to choose your desired layout.
Try this:
-(BOOL)textFieldShouldReturn:(UITextField *)textField { [textField setKeyboardType:UIKeyboardTypeNumbersAndPunctuation]; [textField reloadInputViews]; return YES; }
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