Gank
Gank

Reputation: 4667

iOS How to add "Done" bar to input keyboard?

enter image description here

enter image description here

Like the two pictures, a self-window bar is above the keyboard. How to make it? Are there any third-party libraries doing it?

Upvotes: 0

Views: 361

Answers (1)

Tommy
Tommy

Reputation: 100612

There's nothing complicated to it whatsoever. Assign the view you want to appear above the keyboard as the text field or view's inputAccessoryView (scroll down to that property; Apple's dodgy approach to HTML doesn't permit deeper links). No need for third-party anything; it's a built-in function of UIKit.

Besides that reference to the class documentation, Apple has documented this in the abstract and provides sample code.

Upvotes: 2

Related Questions