diff --git a/Source/ASPagerFlowLayout.m b/Source/ASPagerFlowLayout.m index 86892c9033..a1de537a4b 100644 --- a/Source/ASPagerFlowLayout.m +++ b/Source/ASPagerFlowLayout.m @@ -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