Skip to content

Commit a2a01da

Browse files
author
郑立宝
committed
iphonex判断
1 parent 8ea80b6 commit a2a01da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FlexLib/Classes/FlexUtils.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ BOOL IsIphoneX(void)
224224

225225
if(@available(iOS 11.0,*)){
226226

227-
UIWindow *mainWindow = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
228-
if(mainWindow.safeAreaInsets.bottom>0)
227+
UIWindow *window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
228+
if(window.safeAreaInsets.bottom>0)
229229
{
230230
iphoneX = 1;
231231
}

0 commit comments

Comments
 (0)