I have a
UITextView with text in it, and I want to be able to scroll it such that a given
NSRange of the text is at the top of the view. Using
scrollRangeToVisible: does not work: it will scroll the range such that it is somewhere in the view, not necessarily where I want it to be. How can I scroll such that this specific
NSRange of text in the
UITextView is exactly at the top?
Thanks for any suggestions.
Stretching An Image in Tableview
sizeWithFont:constrainedToSize:lineBreakMode:to job out the size of the box immediately above the text you want (this may be tricky if the text doesn't have to start the line; you may have to try several ranges to find the one this causes the height to jump). Cocoa-touch - implementation files?That should commit you the contentOffset you need for UIScrollView