How to remove language change key button from keyboard in iOS Swift 3

I want to remove change language key from my keyboard in an iOS app with Swift3 .enter image description here

+3


source to share


3 answers


(applies to iOS 10 or later)

Swift

Use. asciiCapable

for Swift



txtField.keyboardType = .asciiCapable

      

Objective-C

self.txtField.keyboardType = UIKeyboardTypeNumbersAndPunctuation;

      

+2


source


You can do this using: yourTextField.keyboardType = .asciiCapable

.



+1


source


You cannot remove a specific button from the keyboard unless you create a custom keyboard. There are third party custom keyboards available that you can use in your application. You can also control the behavior of custom keyboards.

Another alternative is to set the keyboard type to ASCII Capable.

enter image description here

You can also program the keyboard type:

Swift 4:
yourTextField.keyboardType = .asciiCapable

Swift 3:
yourTextField.keyboardType = UIKeyboardType.asciiCapable

Objective C
yourTextField.keyboardType = UIKeyboardTypeASCIICapable

:;
yourTextField.keyboardType = UIKeyboardTypeNumbersAndPunctuation

+1


source







All Articles