适配IPhone X相关宏定义

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/timtian008/article/details/79746006

// MARK: 适配IPhone X

#define AppStatusBarHeight   [[UIApplication sharedApplication] statusBarFrame].size.height  // 适配iPhone x 状态浪高度
#define AppSafeViewTopSpace AppStatusBarHeight+44
#define AppTabbarHeight     ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:50) // 适配iPhone x 底栏高度
#define AppBottomspace  AppIsIPhoneX?HGADPT(66):0

#define AppSafeViewH  ScreenH - AppSafeViewTopSpace - AppTabbarHeight

/* 判断IPhone X/

#define AppIsIPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页