iOS:fix cannot change rootView's layoutconfig or size
This commit is contained in:
@@ -125,7 +125,8 @@ - (void)doricLayoutSubviews {
|
||||
if ([self.superview requestFromSubview:self]) {
|
||||
[self.superview doricLayoutSubviews];
|
||||
} else {
|
||||
[self layoutSelf:CGSizeMake(self.width, self.height)];
|
||||
CGSize size = [self measureSize:CGSizeMake(self.superview.width, self.superview.height)];
|
||||
[self layoutSelf:size];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -378,6 +378,9 @@ - (NSDictionary *)getLocationOnScreen {
|
||||
}
|
||||
|
||||
- (void)blendLayoutConfig:(NSDictionary *)params {
|
||||
if (!self.layoutConfig) {
|
||||
self.view.layoutConfig = [DoricLayoutConfig new];
|
||||
}
|
||||
[params[@"widthSpec"] also:^(NSNumber *it) {
|
||||
if (it) {
|
||||
self.layoutConfig.widthSpec = (DoricLayoutSpec) [it integerValue];
|
||||
|
Reference in New Issue
Block a user