注意是13.0 以后新增UIWindowScene
/** 判斷是不是齊劉海屏幕系列*/
+ (BOOL)QiLiuhaiSeries
{
??? // 根據(jù)安全區(qū)域判斷
?????? if (@available(iOS 11.0, *)) {
?????????
?????????? CGFloat height = 0;
??????????
?????????? if (@available(iOS 13.0, *)) {
??????????????
?????????????? NSArray *array =[[[UIApplication sharedApplication] connectedScenes] allObjects];
?????????????????????????????????
?????????????? UIWindowScene *windowScene = (UIWindowScene *)array[0];
??????????????
?????????????? if (windowScene) {
?????????????????? UIWindow *window = windowScene.windows[0];
??????????????????? if (window) {
??????????????????????? height = window.safeAreaInsets.bottom;
??????????????????? }
?????????????? }
?????????? } else {
?????????????? height = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom;
?????????? }
??????????
?????????? return (height > 0);
??????????
?????? } else {
??????????
?????????? return NO;
?????? }
??? return NO;
}