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 (weak, nonatomic) MVMCoreUITopAlertExpandableView *topAlertClearspotView;
|
||||||
@property (strong, nonatomic) NSString *time;
|
@property (strong, nonatomic) NSString *time;
|
||||||
|
|
||||||
@property (nonatomic, assign) UIStatusBarStyle defaultStatusBarStyle;
|
|
||||||
@property (nonatomic, strong) UIColor *defaultStatusBarBackgroundColor;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MVMCoreUITopAlertView
|
@implementation MVMCoreUITopAlertView
|
||||||
@ -207,7 +204,8 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
|||||||
completionHandler(finished);
|
completionHandler(finished);
|
||||||
weakSelf.topAlertObject = nil;
|
weakSelf.topAlertObject = nil;
|
||||||
[MVMCoreDispatchUtility performBlockOnMainThread:^{
|
[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 {
|
- (void)resetDefaultStatusBarStyle:(UIStatusBarStyle)style backgroundColor:(UIColor *)backgroundColor {
|
||||||
self.defaultStatusBarStyle = style;
|
UIColor *defaultStatusBarBackgroundColor = backgroundColor;
|
||||||
self.defaultStatusBarBackgroundColor = backgroundColor;
|
if (!defaultStatusBarBackgroundColor) {
|
||||||
if (!backgroundColor) {
|
defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor];
|
||||||
self.defaultStatusBarBackgroundColor = style == UIStatusBarStyleDefault ? [UIColor whiteColor] : [UIColor blackColor];
|
|
||||||
}
|
}
|
||||||
if (!self.topAlertObject) {
|
if (!self.topAlertObject) {
|
||||||
//style or color doens't match the current default value
|
//style or color doens't match the current default value
|
||||||
if (style != self.statusBarStyle || !CGColorEqualToColor(self.defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) {
|
if (style != self.statusBarStyle || !CGColorEqualToColor(defaultStatusBarBackgroundColor.CGColor, self.statusBarView.backgroundColor.CGColor)) {
|
||||||
[self setStatusBarColor:self.defaultStatusBarBackgroundColor statusBarStyle:style];
|
[self setStatusBarColor:defaultStatusBarBackgroundColor statusBarStyle:style];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user