Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting keyboard to a textfield to English language only

Tags:

ios

swift

Is there a way to set the keyboard to a textfield to English language only? I don´t want the user to be able to switch to another language.

Many people think/says it is not possible, but the answer on this topic with 14 up votes, begs to differ. Only problems is, it is written in objective c and I only know swift... iPhone: Change Keyboard language programmatically

like image 651
simiboy96 Avatar asked Apr 23 '16 17:04

simiboy96


1 Answers

yourTextField.keyboardType = UIKeyboardType.alphabet

this is the solution. :)

like image 174
Kang Developer Avatar answered Oct 05 '22 14:10

Kang Developer