We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fe7247 commit 7b23c13Copy full SHA for 7b23c13
ios/ReactNativePageView.m
@@ -511,7 +511,12 @@ - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
511
512
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
513
CGPoint point = scrollView.contentOffset;
514
- float offset = (point.x - self.frame.size.width)/self.frame.size.width;
+ float offset = 0;
515
+ if (_orientation == UIPageViewControllerNavigationOrientationHorizontal) {
516
+ offset = (point.x - self.frame.size.width)/self.frame.size.width;
517
+ } else {
518
+ offset = (point.y - self.frame.size.height)/self.frame.size.height;
519
+ }
520
if(fabs(offset) > 1) {
521
offset = offset > 0 ? 1.0 : -1.0;
522
}
0 commit comments