Pager should invalidate flow layout metrics on bounds change (#3133)

This commit is contained in:
Adlai Holler 2017-03-04 11:01:09 -08:00 committed by GitHub
parent 0de270fdfb
commit 2785a0bcd8

View File

@ -101,4 +101,12 @@
return [super shouldInvalidateLayoutForBoundsChange:newBounds];
}
- (UICollectionViewLayoutInvalidationContext *)invalidationContextForBoundsChange:(CGRect)newBounds
{
UICollectionViewFlowLayoutInvalidationContext *ctx = (UICollectionViewFlowLayoutInvalidationContext *)[super invalidationContextForBoundsChange:newBounds];
ctx.invalidateFlowLayoutDelegateMetrics = YES;
ctx.invalidateFlowLayoutAttributes = YES;
return ctx;
}
@end