So I have a UITableView
. Its dataSource is an NSArray
of custom objects beeing loaded after a search. When I scroll to bottom, everything works fine, the scrollIndicator
scrolls to bottom as desired.
Now when I scroll back to top the scrollIndicator stops about 50pixel below my UINavigationbar.
I have no idea why this behaviour occurs only in this tableViewController
, since my UITabBarController
consists of 5 UITableViewcontrollers
each inheriting from the same super class.
Any help is appreciated, thanks in advance :)
EDIT:
Putting the following code in viewWillAppear:
self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, 0);
Solved the issue. Although I still don't know why this issue only occurs in one of the five tableViewControllers...
It looks like you might have set the scrollIndicatorInsets
property of the scroll view wrongly. It might be the same for both bottom and top. Set it so that that you only have the margin for bottom.
i.e
use UIEdgeInsetMake( <top> , <left>,<bottom>,<right>);
for this. i.e for your case
yourScrollView.scrollIndicatorInsets = UIEdgeInsetMake(0, 0,bottomInset,0); //Here bottom inset would be the value you have right now .
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