mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-18 17:02:49 +08:00
chore(ios): Silence/fix warnings (#228)
This commit is contained in:
parent
e214fad877
commit
1672883a7f
@ -269,11 +269,14 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
|||||||
{
|
{
|
||||||
if (_uiviewControllerBasedStatusBarAppearance) {
|
if (_uiviewControllerBasedStatusBarAppearance) {
|
||||||
CDVViewController* vc = (CDVViewController*)self.viewController;
|
CDVViewController* vc = (CDVViewController*)self.viewController;
|
||||||
vc.sb_statusBarStyle = [NSNumber numberWithInt:style];
|
vc.sb_statusBarStyle = [NSNumber numberWithInt:(int)style];
|
||||||
[self refreshStatusBarAppearance];
|
[self refreshStatusBarAppearance];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[[UIApplication sharedApplication] setStatusBarStyle:style];
|
[[UIApplication sharedApplication] setStatusBarStyle:style];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +354,10 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
UIApplication* app = [UIApplication sharedApplication];
|
UIApplication* app = [UIApplication sharedApplication];
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[app setStatusBarHidden:YES];
|
[app setStatusBarHidden:YES];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -382,7 +388,10 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
UIApplication* app = [UIApplication sharedApplication];
|
UIApplication* app = [UIApplication sharedApplication];
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[app setStatusBarHidden:NO];
|
[app setStatusBarHidden:NO];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user