Skip to content

Commit 85cc042

Browse files
committed
fix(tabs): ported N fix
NativeScript/NativeScript#9089
1 parent 1f5053f commit 85cc042

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/tabs/tabs.ios.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,24 @@ class UIPageViewControllerImpl extends UIPageViewController {
165165
safeAreaInsetsTop = this.topLayoutGuide.length;
166166
}
167167

168+
const conditionalSafeAreaBottom = owner.iosOverflowSafeArea ? safeAreaInsetsBottom : 0;
168169
let scrollViewTop = 0;
169-
let scrollViewHeight = this.view.bounds.size.height + safeAreaInsetsBottom;
170+
let scrollViewHeight = this.view.bounds.size.height + conditionalSafeAreaBottom;
170171

171172
if (owner.tabStrip) {
172-
// this.tabBar.sizeToFit();
173-
const tabBarHeight = this.tabBar.frame.size.height;
174173
const viewWidth = this.view.bounds.size.width;
175174
const viewHeight = this.view.bounds.size.height;
176-
scrollViewTop = tabBarHeight;
177-
scrollViewHeight = viewHeight - tabBarHeight + safeAreaInsetsBottom;
175+
const tabBarHeight = this.tabBar.frame.size.height;
178176
let tabBarTop = safeAreaInsetsTop;
179177

178+
scrollViewTop = tabBarHeight;
179+
scrollViewHeight = this.view.bounds.size.height - tabBarHeight + conditionalSafeAreaBottom;
180+
180181
const tabsPosition = owner.tabsPosition;
181182
if (tabsPosition === 'bottom') {
182183
tabBarTop = viewHeight - tabBarHeight - safeAreaInsetsBottom;
183184
scrollViewTop = this.view.frame.origin.y;
184-
scrollViewHeight = viewHeight - safeAreaInsetsBottom;
185+
scrollViewHeight = viewHeight - tabBarHeight;
185186
}
186187

187188
let parent = owner.parent;

0 commit comments

Comments
 (0)