You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm adding/removing items from the MGScrollView, but I'd like to keep the scroll view 'locked' on the currently visible view or equivalent contentOffset while this is happening.
e.g. say I have a scrollView with 10 boxes, each 100px tall, and I'm at contentOffset {0,500} (i.e. I'm scrolled to the 6th box):
I insert another box somewhere at the top of the list:
Interesting problem! My first instinct would be to put it into MGLayoutManager. In the animation block in layoutBoxesIn:withSpeed:completion:, after final positions are set, you then will know the final location of the item in question, and can adjust the offset within the same animation block.
I'm adding/removing items from the MGScrollView, but I'd like to keep the scroll view 'locked' on the currently visible view or equivalent contentOffset while this is happening.
e.g. say I have a scrollView with 10 boxes, each 100px tall, and I'm at contentOffset {0,500} (i.e. I'm scrolled to the 6th box):
I insert another box somewhere at the top of the list:
I want the user to see nothing happen, and contentOffset should now be {0, 600} i.e. adjusted for the new item.
What I've tried:
The text was updated successfully, but these errors were encountered: