I have a UITableView
with UITextViews
in each cell. I want to move the cell in which the user is editing the UITextView
to the top of the table view.
This is easily achieved by:
self.tableView.contentInset = UIEdgeInsetsMake(0, 0, self.view.frame.size.height - textViewHeight, 0);
However I have a very weird issue, which I can not find anything on, when searching for it. The cell is not moved up, until the keyboard has not finished animating on to the screen, no matter which method I set the contentInset
in. It's as if the keyboard animation has some kind of priority.
After investigating, I found that setting the contentOffset
at the same time, will actually move the cell up, even before the keyboard has finished animating.
Can somebody explain this behaviour to me, or explain whats going on?
Thanks!