UITableView setContentOffset: called from main loop?

102 views Asked by At

I have a UITableView with a variable size UITextView and when the user is about to enter text I move the text field up so it is visible above the keyboard. All is good. But when I adjust the contentOffset while the user is typing it works fine too, but a moment later the table view automatically scrolls back to the top, hiding the text view behind the keyboard. As it turns out, setContentOffset is for some reason called from the main loop with the initial value again. This is really ruining my day, it works all fine and then the system seems to decide to mess up my work again deliberately.

Why is this so? How can I prevent this?

Here is a screenshot of the stack trace:

stack trace screenshot

0

There are 0 answers