0
votes

Dismissing/presenting a modal view controller which contains a tableview makes the table go down one row each time. Repeating presenting/dismissing pushes the table downwards out of the view in the end.

How can I fix this?

1
Giving us an idea of your code might help.Bradley Mountford

1 Answers

0
votes

In the end I fixed it.

This solves the problem:

tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0);

The property is inherited from UIScrollView and it specifies where the content of the scrollview (as tableview is a scrollview) should stay related to scroll's bounds.