Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tns-core-modules/ui/core/view/view.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,15 @@ export namespace ios {
// The TabView itself is handled by the OS, so we check the TabView's parent (usually a Page, but can be a Layout).
const tabViewItem = owner.parent;
const tabView = tabViewItem && tabViewItem.parent;
const parent = tabView && tabView.parent;
let parent = tabView && tabView.parent;

// Handle Angular scenario where TabView is in a ProxyViewContainer
// Not using instanceof ProxyViewContainer to avoid circular dependency
// TODO: Try moving UILayoutViewController out of view module
if (parent && !parent.nativeViewProtected) {
parent = parent.parent;
}

if (parent) {
const parentPageInsetsTop = parent.nativeViewProtected.safeAreaInsets.top;
const currentInsetsTop = this.view.safeAreaInsets.top;
Expand Down
10 changes: 9 additions & 1 deletion tns-core-modules/ui/page/page.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,15 @@ class UIViewControllerImpl extends UIViewController {
// If the Page is nested, cross check safe area insets on top and bottom with Frame parent.
const frame = owner.parent;
// There is a legacy scenario where Page is not in a Frame - the root of a Modal View, so it has no parent.
const frameParent = frame && frame.parent;
let frameParent = frame && frame.parent;

// Handle Angular scenario where TabView is in a ProxyViewContainer
// Not using instanceof ProxyViewContainer to avoid circular dependency
// TODO: Try moving UIViewControllerImpl out of page module
if (frameParent && !frameParent.nativeViewProtected) {
frameParent = frameParent.parent;
}

if (frameParent) {
const parentPageInsetsTop = frameParent.nativeViewProtected.safeAreaInsets.top;
const currentInsetsTop = this.view.safeAreaInsets.top;
Expand Down