iOS:refact requestLayout logic
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user