iOS开发:为什么在指定UIKeyboardTypePhonePad时不会显示电话键盘?

Bea*_*red 2 iphone ipad ios ios5

在我看来,我有一个文本域设置来显示电话键盘,但它只显示标准键盘.这是我的代码......

    contactPhoneTextField = [[UITextField alloc] initWithFrame:frameText];
    contactPhoneTextField.borderStyle = UITextBorderStyleNone;
    contactPhoneTextField.textColor = [UIColor blackColor];
    contactPhoneTextField.font = [UIFont systemFontOfSize:17.0];
    contactPhoneTextField.placeholder = @"Tap To Enter Contact Phone Number";
    contactPhoneTextField.backgroundColor = [UIColor clearColor];
    contactPhoneTextField.autocorrectionType = UITextAutocorrectionTypeNo;  
    contactPhoneTextField.keyboardType = UIKeyboardTypePhonePad; //<<<----
    contactPhoneTextField.returnKeyType = UIReturnKeyDone;  
    contactPhoneTextField.clearButtonMode = UITextFieldViewModeWhileEditing;        
    contactPhoneTextField.delegate = self;  
Run Code Online (Sandbox Code Playgroud)

是什么赋予了?

非常感谢您的智慧!

dom*_*dom 7

看起来你在使用iPad?此设备上没有可用的手机垫...因此显示的带有数字的键盘布局是正确的.