Created
November 2, 2018 11:30
-
-
Save Alexander-Ignition/298c60a9909259abb0f1740b410a4ffd to your computer and use it in GitHub Desktop.
UITextField keyboard language
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TextField: UITextField { | |
override var textInputMode: UITextInputMode? { | |
return UITextInputMode.activeInputModes.first(where: { | |
$0.primaryLanguage?.contains("ru") == true | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment