Reputation: 951
How to scroll whole UITableView
content outside of UITableView
frame?
Setting table.scrollIndicatorInsets
does not let to scroll upwards and content disappear behind another view at the top.
Upvotes: 1
Views: 2721
Reputation: 107
select Table view-> got to Attribute indicator -> tick on "Clip To Bounds". Done
Upvotes: 2
Reputation: 303
As @Tushar pointed out setting the size of view might be the correct approach here, but double the size of the contentview, might be a bit overkill if you have a really long tableview. I would suggest adding the size of the current window instead.
CGFloat oldContentHeight = tableView.contentSize.height;
CGFloat windowHeight = [[[UIApplication sharedApplication] delegate] window].frame.size.height);
tableView.contentSize = CGSizeMake(tableView.contentSize.width, oldContentHeight + windowHeight);
Upvotes: 1
Reputation: 3052
Try this :
after loading of the view completed e.g after viewDidAppear:
CGFloat oldContentHeight = tableView.contentSize.height;
tableView.contentSize = CGSizeMake(tableView.contentSize.width, oldContentHeight + tableView.bounds.size.height);
Updated the answer.
Upvotes: 2