reza_khalafi
reza_khalafi

Reputation: 6534

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

Upvotes: 8

Views: 3286

Answers (2)

Vineeth Joseph
Vineeth Joseph

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

Anbu.Karthik
Anbu.Karthik

Reputation: 82759

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.

Upvotes: 5

Related Questions