I want to remove change language key from my keyboard in iOS app with Swift3.
(Applies for iOS 10 or later)
Swift
Use .asciiCapable
for Swift
txtField.keyboardType = .asciiCapable
Objective-C
self.txtField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
You cannot remove a specific button from keyboard unless you create a custom keyboard. There are third party custom keyboards available that you can use in your app. You can manage behavior of custom keyboards also.
Another alternate option is: set keyboard type as ASCII Capable.
You can also set keyboard type programatically:
Swift 4:
yourTextField.keyboardType = .asciiCapable
Swift 3:
yourTextField.keyboardType = UIKeyboardType.asciiCapable
Objective C:
yourTextField.keyboardType = UIKeyboardTypeASCIICapable
;
yourTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation
;
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