Last active
January 28, 2020 07:21
-
-
Save factoryhr/a4ad50d701c5572e4adda55f094093e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func invalidateLayout(with context: UICollectionViewLayoutInvalidationContext) { | |
let invalidationContext = context as! CustomLayoutInvalidationContext | |
if invalidationContext.invalidatedBecauseOfBoundsChange || invalidationContext.invalidateEverything { | |
layoutAttributesForItems.removeAll() | |
} | |
super.invalidateLayout(with: invalidationContext) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment