In my app I have a UISearchBar
under UINavigationBar
so it is always visible to user. In that case I had to set contentInset
with extra 44px so the UIScrollView
will be scrolling under UISearchBar
(exactly like in Contacts.app). And there would be no problem with static UITableView
's but in my case I have to reload it's contents, switch to UISearchDisplayController
etc. So when I call:
[self.tableView setContentInset:UIEdgeInsetsMake(108, 0, 0, 0)];
Everything works until e.g. I pull to refresh... (for this I use SSPullToRefresh
).
So my question is: How can I set contentInset
permanently so I wouldn't have to worry about any changes happening to data inside UITableView
?