remove local default status bar style
This commit is contained in:
parent
89427b1b7a
commit
1b5d423659
@ -46,9 +46,6 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
||||
@property (weak, nonatomic) MVMCoreUITopAlertExpandableView *topAlertClearspotView;
|
||||
@property (strong, nonatomic) NSString *time;
|
||||
|
||||
@property (nonatomic, assign) UIStatusBarStyle defaultStatusBarStyle;
|
||||
@property (nonatomic, strong) UIColor *defaultStatusBarBackgroundColor;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MVMCoreUITopAlertView
|
||||
@ -207,7 +204,8 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
||||
completionHandler(finished);
|
||||
weakSelf.topAlertObject = nil;
|
||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
||||
[weakSelf resetDefaultStatusBarStyle:weakSelf.defaultStatusBarStyle backgroundColor:weakSelf.defaultStatusBarBackgroundColor];
|
||||
MVMCoreUISplitViewController *mainsplit = [MVMCoreUISplitViewController mainSplitViewController];
|
||||
[weakSelf resetDefaultStatusBarStyle:[mainsplit getDefaultStatusBarStyle] backgroundColor:[mainsplit getDefaultStatusBarBackgroundColor]];
|
||||
}];
|
||||
}];
|
||||
}];
|
||||
@ -248,15 +246,14 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
||||
}
|
||||
|
||||
- (void)resetDefaultStatusBarStyle:(UIStatusBarStyle)style backgroundColor:(UIColor *)backgroundColor {
|
||||
self.defaultStatusBarStyle = style;
|
||||
self.defaultStatusBarBackgroundColor = backgroundColor;
|
||||
if (!backgroundColor) {
|
||||
self.defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor];
|
||||
UIColor *defaultStatusBarBackgroundColor = backgroundColor;
|
||||
if (!defaultStatusBarBackgroundColor) {
|
||||
defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor];
|
||||
}
|
||||
if (!self.topAlertObject) {
|
||||
//style or color doens't match the current default value
|
||||
if (style != self.statusBarStyle || !CGColorEqualToColor(self.defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) {
|
||||
[self setStatusBarColor:self.defaultStatusBarBackgroundColor statusBarStyle:style];
|
||||
if (style != self.statusBarStyle || !CGColorEqualToColor(defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) {
|
||||
[self setStatusBarColor:defaultStatusBarBackgroundColor statusBarStyle:style];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user