iOS:refact requestLayout logic

This commit is contained in:
pengfei.zhou
2020-04-08 11:57:38 +08:00
committed by osborn
parent 95d9158fac
commit b17ff48c59
11 changed files with 27 additions and 46 deletions

View File

@@ -37,7 +37,9 @@ - (void)setContentView:(UIView *)contentView {
- (CGSize)sizeThatFits:(CGSize)size {
if (self.contentView) {
[self.contentView.doricLayout apply:self.frame.size];
if (!self.contentView.doricLayout.resolved) {
[self.contentView.doricLayout apply:self.frame.size];
}
return self.contentView.frame.size;
}
return CGSizeZero;
@@ -117,6 +119,10 @@ - (void)afterBlended:(NSDictionary *)props {
}
}
- (void)requestLayout {
[self.view.contentView.doricLayout apply:self.view.frame.size];
}
- (void)blendView:(DoricScrollView *)view forPropName:(NSString *)name propValue:(id)prop {
if ([@"content" isEqualToString:name]) {
self.childViewId = prop;