UITextView and position of floating autocorrect wi

2019-04-04 06:29发布

I have a UITextView with autocorrection on. The view's height is about 30 pix. When autocorrect kicks in the autocorrect view is nearly invisible below the text. Is there a way to control the position of the small autocorrect window or insure it is the top layer so it is always visible and the user can easily see and interact with it?

3条回答
何必那么认真
2楼-- · 2019-04-04 06:53

After trying various solutions unsuccessfully, I find the best way that worked for me is to simply add your UITextView inside a UIView.

查看更多
Root(大扎)
3楼-- · 2019-04-04 07:08

Did you try to set clipsToBounds=NO for your UITextView? Sounds like it's clipping the autocorrect view to the frame size of your UITextView..or perhaps auto-positioning it inside your frame. Worth a try anyway..

查看更多
孤傲高冷的网名
4楼-- · 2019-04-04 07:16

I discovered that setting the scrollEnabled to false on the UITextView the popup would always appear above the word being corrected.

查看更多
登录 后发表回答