diff --git a/iOS/Pod/Classes/Shader/DoricLayouts.m b/iOS/Pod/Classes/Shader/DoricLayouts.m index 94426d91..088d3339 100644 --- a/iOS/Pod/Classes/Shader/DoricLayouts.m +++ b/iOS/Pod/Classes/Shader/DoricLayouts.m @@ -124,16 +124,19 @@ - (void)requestLayout { }); } -- (void)layoutSubviews { - [super layoutSubviews]; - [self requestLayout]; -} - - (void)setNeedsLayout { + [super setNeedsLayout]; if (self.waitingLayout) { return; } - [super setNeedsLayout]; + [self requestLayout]; +} + +- (BOOL)waitingLayout { + if ([self.superview isKindOfClass:[DoricLayoutContainer class]]) { + return [(DoricLayoutContainer *) self.superview waitingLayout]; + } + return _waitingLayout; } - (void)layout {