user2312407
user2312407

Reputation: 67

Best way to implement UIToolbar with UITextField above keyboard

What is the best way to have a UIToolbar with a UITextField appear above the keyboard ?

In particular, I'm looking for a way to implement this in iOS 6.

The basic functionality I am trying to achieve is similar to iOS SMS app except the keyboard would appear by default.

Thanks.

Upvotes: 0

Views: 1378

Answers (1)

Mahmoud Adam
Mahmoud Adam

Reputation: 5852

Either adding a toolbar to your storyboard and add an outlet to it, or add the toolbar to a xib file then use InputAccessoryView of text field you want to add the toolbar to it e.g.

[[NSBundle mainBundle] loadNibNamed:@"KeyboardToolbar" owner:self options:nil];
[textField setInputAccessoryView:keyboardToolbar];

enter image description here

Upvotes: 3

Related Questions