UITextView doesn't show InputAccessoryView on first click

拜拜、爱过 提交于 2019-12-03 11:14:46

问题


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:


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:



来源:https://stackoverflow.com/questions/5803267/uitextview-doesnt-show-inputaccessoryview-on-first-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!