iOS:fix when set weight error
This commit is contained in:
parent
365b89cfa6
commit
3eda0358d1
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user