Merge branch 'feature/fix_iOS_layout_container' into 'master'
fix sometimes call layoutsubviews while in layout See merge request !6
This commit is contained in:
commit
cd7893b83c
@ -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 {
|
||||
|
Reference in New Issue
Block a user