background color for constrained views optional
This commit is contained in:
parent
01803e90d6
commit
bd365d60d2
@ -115,7 +115,6 @@
|
||||
[self setAsLight];
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
self.hidden = YES;
|
||||
}
|
||||
@ -169,4 +168,8 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)copyBackgroundColor {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user