开发者

Presenting modal view controller makes its tableview move down little by little

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 th开发者_如何学Pythone end.

How can I fix this?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜