diff --git a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m index d41c2358..7f42afcd 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricLayouts.m +++ b/doric-iOS/Pod/Classes/Shader/DoricLayouts.m @@ -106,6 +106,13 @@ - (CGSize)measureSize:(CGSize)targetSize { if (config.heightSpec == DoricLayoutWrapContent) { height = contentSize.height + padding.top + padding.bottom; } + if (config.weight) { + if ([self.superview isKindOfClass:[DoricVLayoutView class]]) { + height = self.height; + } else if ([self.superview isKindOfClass:[DoricHLayoutView class]]) { + width = self.width; + } + } return CGSizeMake(width, height); }