Reputation: 756
I would like to change the keyboard style. I have attached two pictures one the current situation and the second one is the desired situation.
Upvotes: 1
Views: 1474
Reputation: 61
textField.keyboardType = .emailAddress
After = . (Multiple Suggestions for keyboard type you can select according to your usage)
Upvotes: -1
Reputation: 1570
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
Upvotes: 4
Reputation: 756
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
Upvotes: 1