x color fix

This commit is contained in:
Pfeil, Scott Robert 2020-02-13 15:43:59 -05:00
parent 8d3dea90a8
commit c4c96dc4d4

View File

@ -241,11 +241,17 @@
- (void)setupWithMessage:(nullable NSString *)message subMessage:(nullable NSString *)subMessage color:(nullable UIColor *)color buttonTitle:(nullable NSString *)buttonTitle userActionHandler:(nullable void (^)(id _Nonnull sender))userActionHandler {
self.message = message;
self.subMessage = subMessage;
self.contentColor = color;
[MVMCoreDispatchUtility performBlockOnMainThread:^{
// Sets the string
self.label.attributedText = [MVMCoreUITopAlertBaseView getStringForMessage:message subMessage:subMessage color:color];
// Sets the color
if (color) {
[self.closeButton setTintColor:color];
}
// Sets the button
[self setupButtonWithButtonTitle:buttonTitle userActionHandler:userActionHandler];
}];
@ -294,8 +300,8 @@
if ([self init]) {
self.backgroundColor = color;
[self setupViewWithLabelAndImage:nil topImage:nil];
[self setupCloseButton:closeButton animationDelegate:animationDelegate];
[self setupWithMessage:message subMessage:subMessage color:contentColor buttonTitle:nil userActionHandler:NULL];
[self setupCloseButton:closeButton animationDelegate:animationDelegate];
}
return self;
}