I'm debugging a UITextView which logs my operation.
e.g. If I press a special button on the screen, this UITextView will show which button I just pressed. It will log more as I pressed more buttons, so I can easily scroll the UITextView to see my past operation.
Because the UITextView itself doesn't scroll with increasing text, so I try to make it scroll to the last line when something is logged into it.
I try to use the scrollRangeToVisible() method below
history.scrollRangeToVisible(NSMakeRange(count(history.text!) - 1, 1))
Here history is a UITextView outlet.
The problem is, this method always makes the UITextView to scroll from the beginning to the designated NSRange. More specifically, it will reset the view to the beginning of the text and then scroll down to wherever the NSRange is. I want it to scroll directly down,
Can someone solve this problem? Thanks a lot.