I'm trying to make my text field show only Arabic numbers keyboard, no matter what language the device have. I changed the app base language to Arabic and it is still showing me English numbers.
I'm trying to make my text field show only Arabic numbers keyboard, no matter what language the device have. I changed the app base language to Arabic and it is still showing me English numbers.
You can create a subclass like ArabicTextField of UITextField and use textInputMode property to change your keyboard as below
class ArabicTextField: UITextField {
override var textInputMode: UITextInputMode? {
UITextInputMode.activeInputModes.filter
{ $0.primaryLanguage == "ar" }.first ?? super.textInputMode }
}