Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How disable change language in number pad in iOS Objective C?

I have texFiled I'm my view controller and i set number pad for that like this:

self.phoneTextField.keyboardType = UIKeyboardTypeNumberPad; 

And now i want user just can enter english number in text field(can not change language)

enter image description here

like image 722
reza_khalafi Avatar asked Feb 14 '17 07:02

reza_khalafi


2 Answers

(This only applies for iOS 10 or later and for number pad)

Swift

yourTextField.keyboardType = .asciiCapableNumberPad

Objective C

yourTextField.keyboardType = UIKeyboardTypeASCIICapableNumberPad;
like image 108
Vineeth Joseph Avatar answered Nov 13 '22 20:11

Vineeth Joseph


NO,we can't disable or Hidden the keyboard properties, it is not possible to handle the default property of Keyboardtypein iOS, if you want to make it own customization then you go for Custom Keyboard Concept. else try once with another keyboard Types

Choice 2

in that place you can add one Overlay for disable , you can get the sample from here.but

If Apple figures out that the key is covered or. disabled they will most likely reject the app.

like image 24
Anbu.Karthik Avatar answered Nov 13 '22 21:11

Anbu.Karthik