Skip to content

Commit

Permalink
fix: always set the parent
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Nov 24, 2023
1 parent cb52301 commit 5f4d0e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/ui/core/view/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,15 @@ export class View extends ViewCommon implements ViewDefinition {
const nativeView = this.ios || this.nativeViewProtected;
controller = <IOSHelper.UILayoutViewController>IOSHelper.UILayoutViewController.initWithOwner(new WeakRef(this));
controller.modal = true;
this.parent = Application.getRootView();

if (nativeView instanceof UIView) {
controller.view.addSubview(nativeView);
}

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;
Expand Down

0 comments on commit 5f4d0e9

Please sign in to comment.