iOS render stack and soon

This commit is contained in:
pengfei.zhou
2019-07-31 17:43:26 +08:00
parent 674335324b
commit b0e34a316b
14 changed files with 284 additions and 85 deletions

View File

@@ -33,6 +33,7 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop
if ([width integerValue] < 0) {
self.layoutParams.width = [width integerValue];
} else {
self.layoutParams.width = LAYOUT_ABSOLUTE;
view.width = [width floatValue];
}
} else if([name isEqualToString:@"height"]) {
@@ -40,6 +41,7 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop
if ([height integerValue] < 0) {
self.layoutParams.height = [height integerValue];
} else {
self.layoutParams.height = LAYOUT_ABSOLUTE;
view.height = [height floatValue];
}
} else if([name isEqualToString:@"x"]) {
@@ -57,6 +59,22 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop
}
}
- (CGFloat)measuredWidth {
if ([self.layoutParams isKindOfClass: MarginLayoutParams.class]) {
MarginLayoutParams *marginParams = (MarginLayoutParams *)self.layoutParams;
return self.width + marginParams.margin.left + marginParams.margin.right;
}
return self.width;
}
- (CGFloat)measuredHeight {
if ([self.layoutParams isKindOfClass: MarginLayoutParams.class]) {
MarginLayoutParams *marginParams = (MarginLayoutParams *)self.layoutParams;
return self.height + marginParams.margin.top + marginParams.margin.bottom;
}
return self.height;
}
- (void)measureByParent:(DoricGroupNode *)parent {
}