diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 481ca8d80e..2bb19415c0 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -505,7 +505,6 @@ export class View extends ViewCommon implements ViewDefinition { const nativeView = this.ios || this.nativeViewProtected; controller = IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(this)); controller.modal = true; - this.parent = Application.getRootView(); if (nativeView instanceof UIView) { controller.view.addSubview(nativeView); @@ -513,6 +512,8 @@ export class View extends ViewCommon implements ViewDefinition { this.viewController = controller; } + // we set the parent to root to access all css root variables + this.parent = Application.getRootView(); if (options.transition) { controller.modalPresentationStyle = UIModalPresentationStyle.Custom;