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); } }