I\'m trying to structure a page similar to Twitter\'s profile page. It looks like they are using a basic UITableView
. The top profile is just the tableHeaderView. T
I'm 99% certain they are simply adjusting the scroll indicator insets as you scroll view the table:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
CGFloat const visibleHeaderHeight = 0.0; // your logic here
UIEdgeInsets const insets = UIEdgeInsetsMake(visibleHeaderHeight, 0.0, 0.0, 0.0);
self.scrollView. scrollIndicatorInsets = insets;
}
Also I'm pretty sure they are using a grouped style table view due to the sectioning, so you would need to build the sticky header yourself. You can also do that in -scrollViewDidScroll:
though.
If you want to break the tabs into separate view controllers, I would recommend the following setup:
UIViewController
containment to plug in the active view controllercontentOffset
and adjust the scroll indicator inset and sticky header y position accordingly