chore(ios): Silence/fix warnings (#228)

This commit is contained in:
jcesarmobile 2022-09-07 22:08:39 +02:00 committed by GitHub
parent e214fad877
commit 1672883a7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
} }
} }