TeehanLax / UICollectionView-Spring-Demo

A demonstration of UICollectionView and UIKit Dynamics
MIT License
473 stars 71 forks source link

Disable behaviors when using [UICollectionView scrollToItemAtIndexPath:atScrollPosition:animated:] #14

Open jakunico opened 10 years ago

jakunico commented 10 years ago

Hi,

I'd like to disable the dynamic behaviour when using [UICollectionView scrollToItemAtIndexPath:atScrollPosition:animated:] but activate it again for when a user scrolls.

Is there a way to do this?

Many thanks, Nicolás.

ashfurrow commented 10 years ago

That's actually a little tricky ... easiest way might be to make a corresponding, non-dynamic layout, such that it has the same placement but doesn't "bounce". Then, you'd have to change the layout, scroll, and then change it back once the scrolling is complete.