romansorochak / ParallaxHeader

Simple way to add parallax header to UIScrollView/UITableView written in Swift.
MIT License
1.03k stars 131 forks source link

Section header isn't moving with the tableview #21

Open MaikoHermans opened 6 years ago

MaikoHermans commented 6 years ago

when adding section headers and using the Plain style for the tableview the header will remain on the location where it starts before you make the parallax header smaller.

Is there a way to fix this so it moves smoothly with the header?

ajacquelin commented 6 years ago

I had the same issue, you can fix it by subclassing UITableView, here is a example: https://gist.github.com/ajacquelin/965e08322fdf60bd0cc82b4b9f9f135a

AlexandrPonomarev commented 6 years ago

@ajacquelin Could not you throw off your code, which solved this problem. I tried to implement a custom tableView class, as in the example by reference, but it did not help.

rajaramanZencode commented 6 years ago

when adding section headers and using the Plain style for the tableview the header will remain on the location where it starts before you make the parallax header smaller.

ajacquelin commented 6 years ago

Here is a gist with the swift implementation: https://gist.github.com/ajacquelin/965e08322fdf60bd0cc82b4b9f9f135a

furiosFast commented 6 years ago

Here is a gist with the swift implementation: https://gist.github.com/ajacquelin/965e08322fdf60bd0cc82b4b9f9f135a

does this code also work for the grouped table?

ugenlik commented 5 years ago

@ajacquelin saved me a couple of hours development time , worked on grouped table too