Reputation: 6534
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)
Upvotes: 8
Views: 3286
Reputation: 5187
(This only applies for iOS 10 or later and for number pad)
Swift
yourTextField.keyboardType = .asciiCapableNumberPad
Objective C
yourTextField.keyboardType = UIKeyboardTypeASCIICapableNumberPad;
Upvotes: 8
Reputation: 82759
NO,we can't disable
or Hidden
the keyboard properties, it is not possible to handle the default property of Keyboardtype
in 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.
Upvotes: 5