diff --git a/MVMCoreUI/Atoms/Views/SeparatorView.m b/MVMCoreUI/Atoms/Views/SeparatorView.m index 9abaeaab..a92c252b 100644 --- a/MVMCoreUI/Atoms/Views/SeparatorView.m +++ b/MVMCoreUI/Atoms/Views/SeparatorView.m @@ -115,7 +115,6 @@ [self setAsLight]; } } - } else { self.hidden = YES; } @@ -169,4 +168,8 @@ return YES; } +- (BOOL)copyBackgroundColor { + return NO; +} + @end diff --git a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m index 7166efee..8b4406fc 100644 --- a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m +++ b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m @@ -326,7 +326,7 @@ if (self.molecule) { [self.molecule setWithJSON:json delegateObject:delegateObject additionalData:additionalData]; } - if (self.constrainedView) { + if (self.constrainedView && (![self.constrainedView respondsToSelector:@selector(copyBackgroundColor)] || [self.constrainedView performSelector:@selector(copyBackgroundColor)])) { self.backgroundColor = self.constrainedView.backgroundColor; } } diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUIViewConstrainingProtocol.h b/MVMCoreUI/OtherHandlers/MVMCoreUIViewConstrainingProtocol.h index 42114416..afea0ef6 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUIViewConstrainingProtocol.h +++ b/MVMCoreUI/OtherHandlers/MVMCoreUIViewConstrainingProtocol.h @@ -21,6 +21,9 @@ /// Can be used to override any standard constraints that may be added. - (BOOL)useStandardConstraints; +/// Determines if the constraining view will copy the background color of the delegate. +- (BOOL)copyBackgroundColor; + /// Will align if it can. - (void)alignHorizontal:(UIStackViewAlignment)alignment; - (void)alignVertical:(UIStackViewAlignment)alignment;