2011-03-09 39 views

回答

1

您應該詢問UITextInputTraits的keyboardType-propery。 UITextField和UITextView都實現了這個協議。

一個例子是:

if(myTextField.keyboardType == UIKeyboardTypeURL) { 
    // do something if it wants URLs 
} 

檢查the documentations更多。