How to get keyboard with Next, Previous and Done Button?

前端 未结 8 1011
我寻月下人不归
我寻月下人不归 2020-12-02 08:55

I want to have a keyboard which has a Next,Previous and Done button on top of it.

I have seen that in many apps.

Especially where there are forms to be fille

相关标签:
8条回答
  • 2020-12-02 09:54

    I have created a repository with an implementation of this feature that works on iPhone/iPad in all orientations and highly customizable.

    0 讨论(0)
  • 2020-12-02 09:54

    As mentioned in other answers, it's the inputAccessoryView that you're looking for.

    I would like to add an alternative way here, by using this cocoapods:

    pod 'UITextField-Navigation'

    All UITextFields will have two additional properties: nextTextField and previousTextField. You can then simply connect the nextTextField in the Interface Builder and the Previous, Next and Done buttons are added automatically for you, all functional, no more code is needed, no subclassing.

    You can also customize the UI, add more buttons, etc as you want to.

    0 讨论(0)
提交回复
热议问题