UITextView doesn't show InputAccessoryView on

2019-03-14 13:57发布

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.

1条回答
来,给爷笑一个
2楼-- · 2019-03-14 14:23

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:

查看更多
登录 后发表回答