Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current item index may be changed after rotation #200

Open
flexme opened this issue Aug 2, 2016 · 0 comments
Open

Current item index may be changed after rotation #200

flexme opened this issue Aug 2, 2016 · 0 comments

Comments

@flexme
Copy link

flexme commented Aug 2, 2016

For example, I have 10 items. In landscape, I swipe to the 9-th item. After I rotate the device to portrait, the current shown item becomes 7-th item...

The reason is that when 9-th item is shown in landscape, the scroll view is:
contentOffset: {8192, 0}; contentSize: {10240, 768}>

After I change it to the portrait, updateScrollViewDimensions will be called changing the content size to {7680, 1024}, and the contentOffset is being changed to {6912, 0} by UIKit automatically, thus SwipeView.scrollViewDidScroll will be called where the the _scrollOffset is being updated to a wrong value...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant