It is possible to show keyboard without using UITextField and UITextView iphone app?

前端 未结 6 1252
执笔经年
执笔经年 2021-01-31 15:53

I am working in iPhone messaging based app.

I want to show keyboard with keyboard inputAccessoryView in keyboard without using UITextView and

6条回答
  •  耶瑟儿~
    2021-01-31 16:16

    See the documentation for doing that here:

    Simple Text Input

    All you need to do is have your view implement UIKeyInput and call [inputView becomeFirstResponder] when the view is touched. Your view also needs to implement canBecomeFirstResponder and return YES.

    Sample code from the iOS documentation which does this.

提交回复
热议问题