Fabio Poloni
Fabio Poloni

Reputation: 8371

UITextView doesn't show InputAccessoryView on first click

I use the UITextViewDelegate and add a InputAccessoryView in textViewDidBeginEditing:

[textView setInputAccessoryView:doneBar];

The doneBar is not nil and it appears on second opening.

Has anyone else this problem?

Thanks in advance.

Upvotes: 19

Views: 9582

Answers (1)

Ken Pespisa
Ken Pespisa

Reputation: 22266

I imagine when the code has reached textViewDidBeginEditing: that it is too late to make changes to the UI. Perhaps you can move your code to an earlier event, maybe textViewShouldBeginEditing:

Upvotes: 72

Related Questions