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 fb1ea98 commit 386c736Copy full SHA for 386c736
ios/ReactNativePageView.m
@@ -483,8 +483,17 @@ - (UIPageControl *)createPageIndicator:(UIView *)parentView {
483
pageControl.tintColor = UIColor.blackColor;
484
pageControl.pageIndicatorTintColor = UIColor.whiteColor;
485
pageControl.currentPageIndicatorTintColor = UIColor.blackColor;
486
+ [pageControl addTarget:self
487
+ action:@selector(pageControlValueChanged:)
488
+ forControlEvents:UIControlEventValueChanged];
489
+
490
return pageControl;
491
}
492
+- (void)pageControlValueChanged:(UIPageControl *)sender {
493
+ if (_reactPageIndicatorView.currentPage != _currentIndex) {
494
+ [self goTo:@(_reactPageIndicatorView.currentPage) animated:YES];
495
+ }
496
+}
497
498
#pragma mark - UIScrollViewDelegate
499
0 commit comments