如何在整个iPhone上创建自定义键盘

时间:2013-10-02 07:23:06

标签: iphone ios ios5 ios6 ios7

是否可以在iOS 5或更高版本中为iPhone或iPad创建自定义键盘? 我的想法是我必须用一些图标创建我自己的键盘。并且它将在文本字段中开始文本时弹出自定义键盘。 可能吗? 在此先感谢。

1 个答案:

答案 0 :(得分:1)

您可以制作自定义输入视图,但仅限于您的应用程序中(即您无法在整个设备上替换键盘):https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/InputViews/InputViews.html#//apple_ref/doc/uid/TP40009542-CH12-SW2

基本上,您只需将自定义视图分配给UITextView(https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextField_Class/Reference/UITextField.html#//apple_ref/occ/instp/UITextField/inputView)的inputView属性,当输入成为第一个响应者时,将显示自定义视图。