try this to change the keyboard type:
self.someTextField.keyboardType = UIKeyboardType.decimalPad
and for number with special character try this :-
UIKeyboardType.numbersAndPunctuation
from :- https://developer.apple.com/documentation/uikit/uitextinputtraits#//apple_ref/c/tdef/UIKeyboardType
well thanks for suggetions and answers .
i found the solution for it.
for the numbers
textField.keyboardType = UIKeyboardType.numbersAndPunctuation
for the alphabets
textField.keyboardType = UIKeyboardType.emailAddress
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.