Fixed deprecated declarations warning (#23625)

Summary:
Fixed deprecated declarations warning.
cc cpojer .

[iOS] [Fixed] - Fixed deprecated declarations warning
Pull Request resolved: https://github.com/facebook/react-native/pull/23625

Differential Revision: D14205929

Pulled By: cpojer

fbshipit-source-id: 5e46f7f598ab1080b93923dcc25c98e1cd4362cd
This commit is contained in:
zhongwuzw 2019-02-24 19:36:23 -08:00 коммит произвёл Facebook Github Bot
Родитель b9d3743cda
Коммит d2ac9a0698
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -108,9 +108,12 @@ RCT_EXPORT_METHOD(setStyle:(UIStatusBarStyle)statusBarStyle
RCTLogError(@"RCTStatusBarManager module requires that the \
UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO");
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[RCTSharedApplication() setStatusBarStyle:statusBarStyle
animated:animated];
}
#pragma clang diagnostic pop
}
RCT_EXPORT_METHOD(setHidden:(BOOL)hidden
@ -120,8 +123,11 @@ RCT_EXPORT_METHOD(setHidden:(BOOL)hidden
RCTLogError(@"RCTStatusBarManager module requires that the \
UIViewControllerBasedStatusBarAppearance key in the Info.plist is set to NO");
} else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[RCTSharedApplication() setStatusBarHidden:hidden
withAnimation:animation];
#pragma clang diagnostic pop
}
}