iOS14 StatusBar高度变为48

运行项目发现顶部露点了


image.png

因为我隐藏了导航栏,控件y往上移了44,而iOS14貌似改成48了,打印一下StatusBar高度:

UIStatusBarManager *statusBarManager = [UIApplication sharedApplication].windows.firstObject.windowScene.statusBarManager;
CGFloat statusBarHeight = statusBarManager.statusBarFrame.size.height;
NSLog(@"%f", statusBarHeight);

iOS14打印出来是48

你可能感兴趣的:(iOS14 StatusBar高度变为48)