In my UICollectionViewFlowLayout subclass I have this:
self.headerReferenceSize = CGSizeMake(280, 44);
However the header is displayed with a width of 320, which is the width of the collection view. This is correct according to the docs:
During layout, only the size that corresponds to the appropriate scrolling direction is used. For example, for the vertical scrolling direction, the layout object uses the height value returned by your method. (In that instance, the width of the header would be set to the width of the collection view.)
However, I need the width to be 280, and not stretch to the entire width of the collection view. How can I override this?