I have a collection view setup with UIKitDynamics Thanks to Here!
I have implemented it in a horizontal scroller and am having some issues with animating scrolls to specify locations in the view. Any scrollTo:Animated:
is having trouble it seems.
First, On selection I would like to center those cell. It appears to be jumping back 10-15pts before animating to the correct offset.
Second, while attempting to scroll to a cell and center it horizontally multiple cells away from the current view. It doesn't quite make it all the way there. It is not getting the correct cell centered.
Any help is appreciated, I'm just trying out dynamics and want to learn more. Thanks!
The more problematic issue here is the second. The following sometimes scrolls correctly to index 12, other times it stops short. I would guess that the dynamic animation adjusts the cells in a way that is causing the scroll animation to think the cell is in a different location. That would lead me to believe that the way the attributes for the cell are being returned incorrectly. Again, fairly new to this.
[hCollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:12 inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];
My code on the ViewController is not doing anything special that would conflict with this.