stoprocent / VGParallaxHeader

Only Parallax Header Class that should work with all kinds of Table Views and Scroll Views while using Auto Layout.
MIT License
564 stars 94 forks source link

Default Header Mode #15

Open inPhilly opened 9 years ago

inPhilly commented 9 years ago

Is there a way to use the header in default mode? I.e. for tableView scrolls up with tableview at non-parallax rate? I know it seems to defeat the purpose, but then the same header (VGParallaxHeader) could be used for both parallax and non-parallax header-views, or when there is somehow a need to switch between.

stoprocent commented 9 years ago

You can use same view for parallax header and normal table header

Instead of:

HeaderView *headerView = [HeaderView instantiateFromNib];
[self.tableView setParallaxHeaderView:headerView mode:VGParallaxHeaderModeCenter height:200];

Just do:

HeaderView *headerView = [HeaderView instantiateFromNib];
[self.tableView setTableHeaderView:headerView];

and set frame height to same as you were using in parallax header