It is clearly a bug that was introduced in iOS 7 (still there for 7.0.6).
As soon as you make UITextView
scrollable, spellchecker underlines are getting mashed. If you set
textView.scrollEnabled = NO;
then it's fixed.
Solution is to put your text view into scroll view and resize scroll view's content size when text grows.
Here are some screenshots. I've also made views coloured so that you can see the bounds of all text view's subviews. Interesting that with .scrollEnabled
set to YES text is inserted in some other UIView
which height is being calculated wrong.
.scrollEnabled == YES
.scrollEnabled == NO