StickyViews icon indicating copy to clipboard operation
StickyViews copied to clipboard

How to not float Footer view

Open cannyboy opened this issue 12 years ago • 1 comments

Is there a way to make the footer view not push up the header view of a section? So the footer goes under the Header, just like the collection view cells do?

cannyboy avatar Aug 07 '13 14:08 cannyboy

@cannyboy If you just comment the lines that update the footer's attributes that will cause the footer for the section to behave as UICollectionViewFlowLayout originally treats it's footer. Does that answer your question?

Just comment out the calls to updateFooterAttributes: in MyLayout.m.

You should also comment out the following lines in layoutAttributesForElementsInRect: of MyLayout.m.

if (!footerFound) {
    [allItems addObject:[self layoutAttributesForSupplementaryViewOfKind:UICollectionElementKindSectionFooter atIndexPath:[NSIndexPath indexPathForItem:[allItems count] inSection:0]]];
}

derrh avatar Aug 18 '13 04:08 derrh