Skip to content

Commit 3260863

Browse files
fix(ios): switching between the pages for rapid tabs
1 parent ba6f04d commit 3260863

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ios/ReactNativePageView.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ - (void)setReactViewControllers:(NSInteger)index
178178
if (self.reactPageViewController == nil) {
179179
return;
180180
}
181+
182+
NSArray *currentVCs = self.reactPageViewController.viewControllers;
183+
if (currentVCs.count == 1 && [currentVCs.firstObject isEqual:controller]) {
184+
return;
185+
}
186+
181187
__weak ReactNativePageView *weakSelf = self;
182188
uint16_t coalescingKey = _coalescingKey++;
183189

0 commit comments

Comments
 (0)