Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Commit

Permalink
Workaround for floating (sticky) headers on iOS 6. Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
darrarski committed May 11, 2014
1 parent b52b089 commit 5103232
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DRCollectionViewTableLayout/DRCollectionViewTableLayout.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ + (Class)invalidationContextClass

- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
{
/**
* Workaround for floating (sticky) headers under iOS 6.
* This is due to custom invalidation contexts are not available under iOS 6.
*/
if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1 &&
[self stickyColumnOrRowHeadersInAnySection]) {
_layoutAttributesForSupplementaryViews = nil;
}

return YES;
}

Expand Down

0 comments on commit 5103232

Please sign in to comment.