diff --git a/tns-core-modules/ui/core/view/view.ios.ts b/tns-core-modules/ui/core/view/view.ios.ts index 327d748ede..8352f7ae6e 100644 --- a/tns-core-modules/ui/core/view/view.ios.ts +++ b/tns-core-modules/ui/core/view/view.ios.ts @@ -892,9 +892,10 @@ export namespace ios { let parent = tabView && tabView.parent; // Handle Angular scenario where TabView is in a ProxyViewContainer + // It is possible to wrap components in ProxyViewContainers indefinitely // Not using instanceof ProxyViewContainer to avoid circular dependency // TODO: Try moving UILayoutViewController out of view module - if (parent && !parent.nativeViewProtected) { + while (parent && !parent.nativeViewProtected) { parent = parent.parent; } diff --git a/tns-core-modules/ui/page/page.ios.ts b/tns-core-modules/ui/page/page.ios.ts index bf89a2cbc2..3ca6fe887e 100644 --- a/tns-core-modules/ui/page/page.ios.ts +++ b/tns-core-modules/ui/page/page.ios.ts @@ -227,9 +227,10 @@ class UIViewControllerImpl extends UIViewController { let frameParent = frame && frame.parent; // Handle Angular scenario where TabView is in a ProxyViewContainer + // It is possible to wrap components in ProxyViewContainers indefinitely // Not using instanceof ProxyViewContainer to avoid circular dependency // TODO: Try moving UIViewControllerImpl out of page module - if (frameParent && !frameParent.nativeViewProtected) { + while (frameParent && !frameParent.nativeViewProtected) { frameParent = frameParent.parent; }