开发者社区> 问答> 正文

关于 iOS键盘弹出警告"Can't find keyplane......"

一点击UITextField,logo显示区就打印如下:

Can't find keyplane that supports type 4 for keyboard iPhone-PortraitChoco-NumberPad; using 1336863583__PortraitChoco__iPhone-Simple-Pad__Default_

_我对UITextField的代码如下:

rect = CGRectMake(xx + side * 2.0, yy, ww - side * 2.2, hh);
phoneTextField = [[UITextField alloc] initWithFrame:rect];
CGFloat fontSize = hh * 0.45;
UIFont *font = [UIFont systemFontOfSize:fontSize];
phoneTextField.font = font;
phoneTextField.placeholder = @"输入手机号码";
if (kIsiPad) {
phoneTextField.returnKeyType = UIReturnKeyNext;
}
phoneTextField.keyboardType = UIKeyboardTypeNumberPad;
phoneTextField.delegate = self;
phoneTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
[self addSubview:phoneTextField];

展开
收起
爵霸 2016-03-06 08:51:24 10027 0
1 条回答
写回答
取消 提交回答
  • 模拟器 Hardware->Keyboard->ConnectHardware Keyboard这一项不要勾选

    2019-07-17 18:53:56
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
手淘iOS性能优化探索 立即下载
From Java/Android to Swift iOS 立即下载
深入剖析iOS性能优化 立即下载