diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m index 02fb2ac6..b65f7423 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m @@ -245,11 +245,12 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed."; } - (void)resetDefaultBackgroundColor:(UIColor *)backgroundColor basedOnStatusBarStyle:(UIStatusBarStyle)style { - UIColor *defaultStatusBarBackgroundColor = backgroundColor; - if (!defaultStatusBarBackgroundColor) { - defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor]; - } if (!self.topAlertObject) { + UIColor *defaultStatusBarBackgroundColor = backgroundColor; + if (!defaultStatusBarBackgroundColor) { + defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor]; + } + //color doesn't match the current default value if (!CGColorEqualToColor(defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) { self.statusBarView.backgroundColor = defaultStatusBarBackgroundColor;