background color for constrained views optional
This commit is contained in:
parent
01803e90d6
commit
bd365d60d2
@ -115,7 +115,6 @@
|
|||||||
[self setAsLight];
|
[self setAsLight];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
self.hidden = YES;
|
self.hidden = YES;
|
||||||
}
|
}
|
||||||
@ -169,4 +168,8 @@
|
|||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (BOOL)copyBackgroundColor {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -326,7 +326,7 @@
|
|||||||
if (self.molecule) {
|
if (self.molecule) {
|
||||||
[self.molecule setWithJSON:json delegateObject:delegateObject additionalData:additionalData];
|
[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;
|
self.backgroundColor = self.constrainedView.backgroundColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,9 @@
|
|||||||
/// Can be used to override any standard constraints that may be added.
|
/// Can be used to override any standard constraints that may be added.
|
||||||
- (BOOL)useStandardConstraints;
|
- (BOOL)useStandardConstraints;
|
||||||
|
|
||||||
|
/// Determines if the constraining view will copy the background color of the delegate.
|
||||||
|
- (BOOL)copyBackgroundColor;
|
||||||
|
|
||||||
/// Will align if it can.
|
/// Will align if it can.
|
||||||
- (void)alignHorizontal:(UIStackViewAlignment)alignment;
|
- (void)alignHorizontal:(UIStackViewAlignment)alignment;
|
||||||
- (void)alignVertical:(UIStackViewAlignment)alignment;
|
- (void)alignVertical:(UIStackViewAlignment)alignment;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user