ios Xcode 6:键盘未显示在模拟器中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24420873/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 6: Keyboard does not show up in simulator
提问by Katsu
The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard?
当我运行模拟器并单击 UITextView 时,键盘不显示。如何重新启用键盘?
It used to work but now it doesn't - I don't know what I might have clicked by accident... any tips would be appreciated!
它曾经可以工作,但现在不行 - 我不知道我可能会意外点击什么......任何提示将不胜感激!
回答by Joe
I had the same issue. My solution was as follows:
我遇到过同样的问题。我的解决方案如下:
- iOS Simulator -> Hardware -> Keyboard
- Uncheck "Connect Hardware Keyboard"
- iOS 模拟器 -> 硬件 -> 键盘
- 取消选中“连接硬件键盘”
Mine was checked because I was using my mac keyboard, but if you make sure it is unchecked the iPhone keyboard will always come up.
我的已被检查,因为我使用的是我的 mac 键盘,但如果您确定未选中它,iPhone 键盘将始终出现。
回答by Aidan Melen
While testing in the ios8 beta simulator, you may toggle between the "software keyboard" and "hardware keyboard" with ?+K.
在 ios8 beta 模拟器中进行测试时,您可以使用?+K在“软件键盘”和“硬件键盘”之间切换。
UPDATE: Since iOS Simulator 8.0, the shortcut is ?+?+K.
更新:从 iOS Simulator 8.0 开始,快捷方式是?+ ?+K。
回答by Kent Ke
Simulator -> Hardware -> Keyboard -> Toggle Software Keyboardshould solve this problem.
Simulator -> Hardware -> Keyboard -> Toggle Software Keyboard应该可以解决这个问题。
回答by Jayprakash Dubey
This seems to be a bug in iOS 8. There are two fixes to this problem :
这似乎是 iOS 8 中的一个错误。此问题有两个修复程序:
Toggle between simulator keyboard and MacBook keyboard using the Command+Kshortcut.
Reattach keyboard to simulator :
a. Open Simulator
b. Select Hardware -> Keyboard
c. Uncheck and then check 'Connect Hardware Keyboard'
使用Command+K快捷键在模拟器键盘和 MacBook 键盘之间切换。
将键盘重新连接到模拟器:
一种。打开模拟器
湾 选择硬件 -> 键盘
C。取消选中,然后选中“连接硬件键盘”
OR simply press the Shift+ Command+ Kshortcut
或只需按Shift+ Command+K快捷键
回答by iAnkit
To enable/disable simulator keyboard,
要启用/禁用模拟器键盘,
? + K (Ctrl + k)
? + K (Ctrl + k)
To disable input from your keyboard,
要禁用键盘输入,
iOS Simulator -> Hardware -> Keyboard -> Uncheck "Connect Hardware Keyboard"
iOS 模拟器 -> 硬件 -> 键盘 -> 取消选中“连接硬件键盘”
回答by Rachit
You can use : ?+?+Kto show keyboard on simulator.
您可以使用: ?+ ?+K显示键盘上的模拟器。
回答by Iryna Batvina
Just press ?K it will toggle keyboard.
只需按 ?K 它将切换键盘。
回答by midhun p
To enable/disable simulator keyboard: click ?+?+K to show the keyboard on simulator, click again to disable (hide) the keyboard.
启用/禁用模拟器键盘:单击 ?+?+K 在模拟器上显示键盘,再次单击禁用(隐藏)键盘。
回答by Martin Velchevski
It would be difficult to say if there's any issue with your code without checking it out, however this happens to me quite a lot in (Version 6.0 (6A216f)). I usually have to reset the simulator's Content and Settings and/or restart xCode to get it working again. Try those and see if that solves the problem.
如果不检查,很难说您的代码是否有任何问题,但是在(版本 6.0 (6A216f))中这种情况在我身上发生了很多。我通常必须重置模拟器的内容和设置和/或重新启动 xCode 以使其再次工作。试试这些,看看是否能解决问题。
回答by Syed Sadrul Ullah Sahad
If keyboard do not shown up automatically in simulator, just press [Command+K]
如果键盘没有在模拟器中自动显示,只需按[Command+K]
or Hardware -> Keyboard -> Toggle Software Keyboard
或硬件 -> 键盘 -> 切换软件键盘