欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

ios 状态栏高度 底部tabbar高度

程序员文章站 2022-03-20 23:29:09
iphone8 CGFloat he = [[UIApplication sharedApplication] statusBarFrame].size.height; NSLog(@"----%lf--",he); // 20iphone xCGFloat he = [[UIApplication sharedApplication] statusBarFrame].size.height; NSLog(@"----%lf--",he);//44...

状态栏高度

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

相关标签: oc