From ed14e242831dc28398bce62a78c7ee8d71f50bed Mon Sep 17 00:00:00 2001 From: Adam Atri Date: Fri, 20 Jan 2023 23:24:44 -0500 Subject: [PATCH] fix(ios): race condition when setting preferredContentSize on view controller (#10179) --- packages/core/ui/core/view/index.ios.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/ui/core/view/index.ios.ts b/packages/core/ui/core/view/index.ios.ts index 83dd35c46..11bdba0fc 100644 --- a/packages/core/ui/core/view/index.ios.ts +++ b/packages/core/ui/core/view/index.ios.ts @@ -479,13 +479,13 @@ export class View extends ViewCommon implements ViewDefinition { } else { //use CSS & attribute width & height if option is not provided const handler = () => { - if (controller) { + if (this.viewController) { const w = (this.width || this.style.width); const h = (this.height || this.style.height); //TODO: only numeric value is supported, percentage value is not supported like Android if (w > 0 && h > 0) { - controller.preferredContentSize = CGSizeMake(w, h); + this.viewController.preferredContentSize = CGSizeMake(w, h); } }