CHTCollectionViewWaterfallLayout icon indicating copy to clipboard operation
CHTCollectionViewWaterfallLayout copied to clipboard

CHTCollectionViewWaterfallLayout run jerky.

Open truonguit2010 opened this issue 9 years ago • 6 comments

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; }

truonguit2010 avatar Mar 11 '15 15:03 truonguit2010

+1 jerky for me too

guyisra avatar Mar 13 '15 05:03 guyisra

+1 jerky for me too. It´s on iOS8.2

dushantSW avatar Apr 01 '15 08:04 dushantSW

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

guyisra avatar Apr 01 '15 10:04 guyisra

Impossible, master is same as 0.8

chiahsien avatar Apr 12 '15 14:04 chiahsien

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.

chiahsien avatar Apr 12 '15 14:04 chiahsien

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.

bencallis avatar Jan 25 '16 11:01 bencallis