From 0e9ec677aec971e0d2b7319db7ae8e3d5ae8083f Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Thu, 15 Sep 2022 19:36:02 -0700 Subject: [PATCH] feat(ios): custom modal transitions part 2 --- packages/core/ui/core/view/index.ios.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 21988fa13..83a3cb36c 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -913,7 +913,9 @@ export class View extends ViewCommon implements ViewDefinition { private _setupAdaptiveControllerDelegate(controller: UIViewController) { this._adaptivePresentationDelegate = IOSHelper.UIAdaptivePresentationControllerDelegateImp.initWithOwnerAndCallback(new WeakRef(this), this._closeModalCallback); - controller.presentationController.delegate = this._adaptivePresentationDelegate; + if (controller?.presentationController) { + controller.presentationController.delegate = this._adaptivePresentationDelegate; + } } } View.prototype._nativeBackgroundState = 'unset';