The UITextInputTraits protocol (which UITextField conforms to) has a keyboardType property of type UIKeyboardType.
myTextField.keyboardType = UIKeyboardTypeNumberPad;
The UITextInputTraits protocol (which UITextField conforms to) has a keyboardType property of type UIKeyboardType.
myTextField.keyboardType = UIKeyboardTypeNumberPad;