From cffb3fb0e95bfc85412ab2e97fe1ce71fc547ede Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Sun, 26 Apr 2020 09:27:17 +0800 Subject: [PATCH] iOS:Change the behaviour only in VLayout and HLayout and Stack --- doric-iOS/Pod/Classes/Shader/DoricLayouts.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m index 53b926ba..d0ad78a7 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m +++ b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m @@ -156,10 +156,10 @@ - (void)measureContent:(CGSize)targetSize { break; } } - if (self.view.superview.doricLayout.widthSpec == DoricLayoutFit && self.widthSpec == DoricLayoutMost) { + if (self.layoutType != DoricUndefined && self.view.superview.doricLayout.widthSpec == DoricLayoutFit && self.widthSpec == DoricLayoutMost) { self.measuredWidth = 0; } - if (self.view.superview.doricLayout.heightSpec == DoricLayoutFit && self.heightSpec == DoricLayoutMost) { + if (self.layoutType != DoricUndefined && self.view.superview.doricLayout.heightSpec == DoricLayoutFit && self.heightSpec == DoricLayoutMost) { self.measuredHeight = 0; } }