iOS: fix missing super call for requestLayout

This commit is contained in:
pengfei.zhou 2021-10-09 14:18:21 +08:00 committed by osborn
parent 3250523fb4
commit f6d117da06
3 changed files with 3 additions and 0 deletions

View File

@ -144,6 +144,7 @@ - (void)requestLayout {
self.view.headerView.bottom = 0; self.view.headerView.bottom = 0;
self.view.headerView.centerX = self.view.width / 2; self.view.headerView.centerX = self.view.width / 2;
[self.view.contentView.doricLayout apply:self.view.frame.size]; [self.view.contentView.doricLayout apply:self.view.frame.size];
[super requestLayout];
} }
- (void)blendSubNode:(NSDictionary *)subModel { - (void)blendSubNode:(NSDictionary *)subModel {

View File

@ -75,6 +75,7 @@ - (void)requestLayout {
node.view.left = idx * self.view.width; node.view.left = idx * self.view.width;
}]; }];
self.view.contentSize = CGSizeMake(self.childNodes.count * self.view.width, self.view.height); self.view.contentSize = CGSizeMake(self.childNodes.count * self.view.width, self.view.height);
[super requestLayout];
} }
- (void)slidePage:(NSDictionary *)params withPromise:(DoricPromise *)promise { - (void)slidePage:(NSDictionary *)params withPromise:(DoricPromise *)promise {

View File

@ -124,6 +124,7 @@ - (void)afterBlended:(NSDictionary *)props {
- (void)requestLayout { - (void)requestLayout {
[self.childNode requestLayout]; [self.childNode requestLayout];
[self.view.contentView.doricLayout apply:self.view.frame.size]; [self.view.contentView.doricLayout apply:self.view.frame.size];
[super requestLayout];
} }
- (void)blendView:(DoricScrollView *)view forPropName:(NSString *)name propValue:(id)prop { - (void)blendView:(DoricScrollView *)view forPropName:(NSString *)name propValue:(id)prop {