UICollectionView lets you define custom views for cell items, for supplementary views, and for decorative views. These must all subclass UICollectionReusableView, so that the collection view can dispose of them to save resources when they are offscreen.
However, I want to add a view which scrolls along with the rest of the collection view's content, but which will never be disposed of. That is because this view contains some complex state I do not wish to manage in the view controller (long story). This view is a bit like a decoration view, in that it does not depend on data vended by the UICollectionViewDatasource.
So what is a valid way to do this?
Option 1. Is there a way to make this a decoration view, but somehow mark it so that the collection view will never dispose of it when it's offscreen?
Option 2. If not, is the best alternative to just add this as an ordinary subview to the collection view, taking advantage of the collection view's functionality as a scroll view? Is this supported by the collection view explicitly, or am I at risk that manually adding a subview will break the collection view's own layout management?
Option 3. If this isn't supported by collection views, then is there another conventional best practice for this case? For instance, I could add the decoration-like view as a sibling to the collection view, and then try to hook into the collection view's pan gesture recognizer, but this feels hacky and fragile.
Since