This should do the trick: (replace "myTextField" with the name of your text field, of course):
myTextField.keyboardType = UIKeyboardTypeURL;
See also: UITextInputTraits protocol that handles things like keyboard layout and auto-correction.
source
share