iOS: List support fit width or height

This commit is contained in:
pengfei.zhou
2022-08-25 11:36:44 +08:00
committed by osborn
parent 3937a3f4d3
commit 921829ba53
2 changed files with 40 additions and 5 deletions

View File

@@ -1085,8 +1085,8 @@ - (void)undefinedMeasureWidth:(DoricMeasureSpec)widthMeasureSpec
+ self.paddingTop + self.paddingBottom
spec:heightMeasureSpec
childMeasuredState:0];
self.measuredWidth = widthSizeAndState.size;
self.measuredHeight = heightSizeAndState.size;
self.measuredWidth = MAX(widthSizeAndState.size, self.minWidth);
self.measuredHeight = MAX(heightSizeAndState.size, self.minHeight);
self.measuredState = (widthSizeAndState.state
<< DORIC_MEASURED_HEIGHT_STATE_SHIFT) | heightSizeAndState.state;
}