ios 状态栏高度 底部tabbar高度
状态栏高度
iphone8
CGFloat he = [[UIApplication sharedApplication] statusBarFrame].size.height;
NSLog(@"----%lf--",he); // 20
iphone x
CGFloat he = [[UIApplication sharedApplication] statusBarFrame].size.height;
NSLog(@"----%lf--",he);//44
顶部导航高度
iphone8 : 44
<UINavigationBar: 0x12bd16760; frame = (0 20; 375 44); opaque = NO; autoresize = W; tintColor = UIExtendedGrayColorSpace 0 1; layer = <CALayer: 0x282ad5be0>>
iphoneX:44
<UINavigationBar: 0x7fa390e12140; frame = (0 44; 414 44); opaque = NO; autoresize = W; tintColor = UIExtendedGrayColorSpace 0 1; layer = <CALayer: 0x600003785cc0>>
底部导航高度
iphone8 : 49
<UITabBar: 0x12be26040; frame = (0 618; 375 49); autoresize = W+TM; gestureRecognizers = <NSArray: 0x28244d710>; layer = <CALayer: 0x282ad3a40>>
iphoneX: 83
<UITabBar: 0x7fa392808070; frame = (0 813; 414 83); autoresize = W+TM; gestureRecognizers = <NSArray: 0x60000392b7b0>; layer = <CALayer: 0x6000037b7a40>>
本文地址:https://blog.csdn.net/baidu_37218374/article/details/107472739
上一篇: 瀑布流布局
下一篇: Python学习日记-递归函数