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?
Asked
Active
Viewed 2,229 times
15
-
I have also seen this using HPGrowingTextView. Seemingly at random, the autocorrect popup will show up below the word being auto corrected, clipped by the bottom edge of the text input box. – Tylerc230 Feb 27 '12 at 02:37
3 Answers
8
I discovered that setting the scrollEnabled to false on the UITextView the popup would always appear above the word being corrected.

Tylerc230
- 2,883
- 1
- 27
- 31
-
2Yep you are correct but at least in my case, I'm trading one problem for another. Now the popup is visible but the user can't scroll! Frankly I think this is an iOS bug. They should insure the popup is always visible. Thanks for the input though. – QBit Mar 02 '12 at 19:08
2
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..

crgt
- 1,482
- 1
- 14
- 17
-
Thanks very much for the suggestion. I went down that path without success though. It did seem reasonable however. – QBit Mar 05 '12 at 05:49
-
That's less than ideal, since UITextView inherits from UIScrollView. Settings clipsToBounds to `NO` means you totally break scrolling. The popup should be window-level. It's an iOS bug. – karwag May 28 '13 at 03:59
0
After trying various solutions unsuccessfully, I find the best way that worked for me is to simply add your UITextView inside a UIView.

noobular
- 3,257
- 2
- 24
- 19