UITextView在第一次单击时不显示InputAccesso

UITextView在第一次单击时不显示InputAccesso

本文介绍了UITextView在第一次单击时不显示InputAccessoryView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 UITextViewDelegate 并在 textViewDidBeginEditing中添加 InputAccessoryView

I use the UITextViewDelegate and add a InputAccessoryView in textViewDidBeginEditing:

[textView setInputAccessoryView:doneBar];

doneBar不是零,它出现在第二次开盘时。

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

还有其他人这个问题吗?

Has anyone else this problem?

提前致谢。

推荐答案

我想当代码达到 textViewDidBeginEditing:时,对UI进行更改为时已晚。也许您可以将代码移动到更早的事件,也许 textViewShouldBeginEditing:

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:

这篇关于UITextView在第一次单击时不显示InputAccessoryView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 23:57