UItextView in UITableview, autocorrection bubble not visible

邮差的信 提交于 2020-01-04 04:31:07

问题


I have a UITableView with custom cells. The cells containing one UITextView each and the cell is resizing during user type text in the TextView. My problem is when user is on first row in a TextView autocorrection bubbles wont be visible in the current cell. Is there any workaround or can someone point me to another direction?

alt text http://img340.imageshack.us/img340/5414/skrmavbild20100519kl092.png


回答1:


If the cell is resizing as the user types, you could set the minimum height of the edited cell to have enough height for the bubbles. Always measure the active cell as if there were at least two lines.

Each UIView has a clipsToBounds property that controls wether contents can be drawn outside the bounds. You might be able to set this to NO for all views in the hierarchy between the bubble and cell. This could have other side effects though.

Also, make sure the active cell has a higher Z order than neighboring cells. It could simply be that the next cell down is drawing over the bubble, as opposed to the active cell cropping the bubble.




回答2:


I propose you a "workaround"

Your user try to edit a row in your table view -> You present a modal view with a UITextView with dismiss and ok button.



来源:https://stackoverflow.com/questions/2863574/uitextview-in-uitableview-autocorrection-bubble-not-visible

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