Changing Headers

How do I implement a changing header as user scrolls?

I Can’t upload a screen recording from my iPhone for some reason so I took a screenshot of each transition the header makes as the user scrolls.