CHTCollectionViewWaterfallLayout
CHTCollectionViewWaterfallLayout copied to clipboard
CHTCollectionViewWaterfallLayout run jerky.
Hi,
- The CHTCollectionViewWaterfallLayout run jerky when I return YES in shouldInvalidateLayoutForBoundsChange function. How can I fix it, without changing return value. Thanks.
- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds { return YES; }
+1 jerky for me too
+1 jerky for me too. It´s on iOS8.2
note that using master (not 0.8) it runs smoothly, so I guess this got fixed. Try to download the .m and .h and manually use them and see if that helps
Impossible, master is same as 0.8
You can't always return YES in (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
.
- If it returns YES, then the layout is invalidate and it needs to do the calculation again.
-
(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds
gets called when you scroll the collection view.
It's unlikely that this will be a problem with the layout. Make sure your cells don't have needed transparent backgrounds and that views are not rendered off screen.
I managed to get to nearly 60fps with just a few optimisations in my views.