我正在尝试为 iOS 8 设计一个自定义键盘。以下是我的开发步骤:

1. Created new project (Single view)
2. Created a new target: File > New > Target, and in the iOS template group chose the Custom Keyboard template.

然后我尝试根据文档步骤启用键盘,这些步骤是:
1. Run the app
2. In iOS Simulator, press home button (Command+Shift+H)
3. Go to Settings > General > Keyboard > Keyboards.
4. Tap Add New Keyboard.
5. In the Purchased Keyboards group, tap the name of your new keyboard. A modal view appears with a switch to enable your keyboard.
6. Tap the switch to enable your keyboard. A warning alert appears.
7. In the warning alert, tap Add Keyboard to finish enabling your new keyboard. Then tap Done.

我的问题是在第 5 步。模态视图没有显示激活键盘的开关,它显示了一个空 View ,如下所示:



我点击了完成按钮,它在激活列表中显示了我的自定义键盘:

但是当我想使用这个键盘时,例如在聚光灯下,它不会显示我的键盘

最佳答案

单击完成按钮将激活键盘。这些菜单中有一些明显的错误。

要更换键盘,您也可以尝试点击按钮来更换键盘,而不是像在上一个屏幕截图中那样按住它。

此外,您似乎将该键盘的语言设置为波斯语,我的猜测是它没有出现,因为您的系统语言不是波斯语(或者您输入的文本字段不支持波斯语)。

如果模拟器中还有其他会影响这一点的错误,我不会感到惊讶。我很高兴听到你能够让它工作。

10-08 05:52
查看更多