Manipulating Visible Headers In Section Using Swift

Ohad Maor
Ohad Maor
Aug 6, 2017 · 6 min read
Pretty cool right ?

Creating the Header Metadata Object

Maintaining the VisibleHeaderMetadata Array

At this point we have an array that holds, during run time, only the visible headers

Changing the header color during scrolling

Let’s dig in

Completing The Missing Objects

Our ColorChangeable protocol:

Our HeaderColorChange Object:

Tap the Automatic label
Choose manual

Our HeaderColorChange extension (for the colors):

Our DataController:

Thanks to shlomi sharon and Alex Pinhasov

Ohad Maor

Written by

Ohad Maor

Senior iOS Engineer and a blogger

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade