Skip to content

Commit a57e24c

Browse files
committed
Keep RNTester content clear of the iOS tab bar
#58900 capped the bottom content inset at 65pt for bottom tab bars, but the tab bar is 83pt tall on current iPhones. The bottom 18pt of every RNTester screen sat under the tab bar, so taps there switched tabs. flatlist-append-maintainvisible taps "Reset" at y=874 and landed on the Playground tab. Use the full bottom safe-area inset instead.
1 parent 1e63505 commit a57e24c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎packages/rn-tester/RNTesterTabsIOS/ios/RNTesterTabsIOSComponentView.mm‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222

2323
using namespace facebook::react;
2424

25-
// Preserve RNTester's existing example bounds on compact bottom-tab layouts.
25+
// Preserve RNTester's existing example top bound on compact bottom-tab layouts.
2626
static constexpr CGFloat LegacyTopInset = 50;
27-
static constexpr CGFloat LegacyBottomInset = 65;
2827

2928
/**
3029
* A tab's view controller, which reports when the tab bar or window changes
@@ -221,7 +220,7 @@ - (void)tabSafeAreaInsetsDidChange:(UIEdgeInsets)insets
221220
CGRectGetMaxY(tabBarFrame) >= CGRectGetMaxY(bounds);
222221
if (hasBottomTabBar) {
223222
insets.top = MAX(insets.top, LegacyTopInset);
224-
insets.bottom = MIN(insets.bottom, LegacyBottomInset);
223+
// Keep the full bottom inset: anything less leaves content under the tab bar, where taps switch tabs.
225224
} else {
226225
insets.bottom = 0;
227226
// A window with no status bar along the top, such as the iPhone Duo's, reports no top inset. Keep

0 commit comments

Comments
 (0)