diff --git a/e2e/ui-tests-app/app/tabs/frame-in-tabs-inner-page-1.xml b/e2e/ui-tests-app/app/tabs/frame-in-tabs-inner-page-1.xml
index f0c7c0c06..ab97e83dc 100644
--- a/e2e/ui-tests-app/app/tabs/frame-in-tabs-inner-page-1.xml
+++ b/e2e/ui-tests-app/app/tabs/frame-in-tabs-inner-page-1.xml
@@ -1,3 +1,12 @@
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
diff --git a/e2e/ui-tests-app/app/tabs/frame-in-tabs-overflow.xml b/e2e/ui-tests-app/app/tabs/frame-in-tabs-overflow.xml
new file mode 100644
index 000000000..e0df8bd11
--- /dev/null
+++ b/e2e/ui-tests-app/app/tabs/frame-in-tabs-overflow.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/e2e/ui-tests-app/app/tabs/main-page.ts b/e2e/ui-tests-app/app/tabs/main-page.ts
index bfee3c3ab..f81cb0866 100644
--- a/e2e/ui-tests-app/app/tabs/main-page.ts
+++ b/e2e/ui-tests-app/app/tabs/main-page.ts
@@ -33,6 +33,7 @@ export function loadExamples() {
examples.set("nested-bottom-navigation", "tabs/nested-bottom-navigation-page");
examples.set("custom-tabstrip", "tabs/custom-tabstrip-page");
examples.set("frame-in-tabs", "tabs/frame-in-tabs");
+ examples.set("frame-in-tabs-overflow", "tabs/frame-in-tabs-overflow");
examples.set("item-color", "tabs/item-color-page");
examples.set("dynamic-color-change", "tabs/dynamic-color-change-page");
diff --git a/nativescript-core/ui/tabs/tabs.ios.ts b/nativescript-core/ui/tabs/tabs.ios.ts
index c0e241c4d..0b603dcb1 100644
--- a/nativescript-core/ui/tabs/tabs.ios.ts
+++ b/nativescript-core/ui/tabs/tabs.ios.ts
@@ -174,20 +174,22 @@ class UIPageViewControllerImpl extends UIPageViewController {
safeAreaInsetsTop = this.topLayoutGuide.length;
}
+ let conditionalSafeAreaBottom = owner.iosOverflowSafeArea ? safeAreaInsetsBottom : 0;
let scrollViewTop = 0;
- let scrollViewHeight = this.view.bounds.size.height + safeAreaInsetsBottom;
+ let scrollViewHeight = this.view.bounds.size.height + conditionalSafeAreaBottom;
if (owner.tabStrip) {
- scrollViewTop = this.tabBar.frame.size.height;
- scrollViewHeight = this.view.bounds.size.height - this.tabBar.frame.size.height + safeAreaInsetsBottom;
+ const tabBarHeight = this.tabBar.frame.size.height;
let tabBarTop = safeAreaInsetsTop;
- let tabBarHeight = this.tabBar.frame.size.height;
+
+ scrollViewTop = tabBarHeight;
+ scrollViewHeight = this.view.bounds.size.height - tabBarHeight + conditionalSafeAreaBottom;
const tabsPosition = owner.tabsPosition;
if (tabsPosition === "bottom") {
- tabBarTop = this.view.frame.size.height - this.tabBar.frame.size.height - safeAreaInsetsBottom;
+ tabBarTop = this.view.frame.size.height - tabBarHeight - safeAreaInsetsBottom;
scrollViewTop = this.view.frame.origin.y;
- scrollViewHeight = this.view.frame.size.height - safeAreaInsetsBottom;
+ scrollViewHeight = this.view.frame.size.height - tabBarHeight;
}
let parent = owner.parent;