【发布时间】:2012-10-23 10:52:53
【问题描述】:
我试图在不使用 UITextView 和 UITextField 的情况下显示 UIKeyboard。我正在按照以下源代码在我的应用程序中显示键盘。
UIKeyboard *keyboard = [[[UIKeyboard alloc] initWithFrame: CGRectMake(0.0f, 220.0f, 320.0f, 216.0f)] autorelease];
[keyboard setReturnKeyEnabled:NO];
[keyboard setTapDelegate:editingTextView];
但代码显示以下错误,
Use of undeclared identifier 'UIKeyboard'
Use of undeclared identifier 'keyboard'
有人请帮忙解决这个错误吗?请告诉我这是在不使用UITextView 和UITextField 的情况下显示键盘的正确方法吗?
【问题讨论】:
-
因为你强行声明了。
-
@VakulSaini 你能告诉我清楚吗?谢谢。
-
在智能中看到它(UIKeyboard)吗?
-
当您不希望用户输入任何内容时,显示键盘的原因是什么?
-
@waheeda 请看我提出的这个问题stackoverflow.com/questions/12995514/…
标签: iphone ios keyboard uikeyboard