SwipeView icon indicating copy to clipboard operation
SwipeView copied to clipboard

Current item index may be changed after rotation

Open flexme opened this issue 8 years ago • 0 comments

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...

flexme avatar Aug 02 '16 04:08 flexme