Adding a Fixed Header to a UICollectionView

Marius Schulz on creating a fixed header with a UICollectionView that supports content scrolling horizontally and vertically:

“A better approach is to add the header bar as a subview of the UICollectionView so that it participates in horizontal scrolling. Now we only need to simulate the stickyness of the header bar by continuously updating its location so that it looks attached to the top.”