I have the following code to set my scrollView's inset:
// top margin for table
self.automaticallyAdjustsScrollViewInsets = NO;
CGFloat navbarHeight = self.navigationController.navigationBar.frame.size.height;
CGFloat statusHeight = [UIApplication sharedApplication].statusBarFrame.size.height;
CGFloat tabBarHeight = self.tabBarController.tabBar.frame.size.height;
CGFloat filterBtnsContainerHeight = 36.0;
CGFloat insetTopMargin = navbarHeight + statusHeight + filterBtnsContainerHeight;
[self.postsTable setContentInset:UIEdgeInsetsMake(insetTopMargin,0,tabBarHeight,0)];
It works great, except that the scrollbar now starts from top and ends at bottom. It should start after the navigaton bar and end before the tabbar. Is there a way to set the container for the scrollbar?
After setting your scrollViewInset try tableView.scrollIndicatorInset = tableView.scrollViewInset
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With