适配IPhone X的技巧

#define TabbarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49) // 适配iPhone x 底部高度
#define Is_Iphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define Is_Iphone_X (Is_Iphone && ScreenHeight == 812.0)
#define NaviHeight Is_Iphone_X?88:64

#define BottomHeight Is_Iphone_X?34:0
#define Tabbarbommon ([[UIApplication sharedApplication] statusBarFrame].size.height>20?34:0) // 适配iPhone x 底栏高度

#define JCNew64 [[UIApplication sharedApplication] statusBarFrame].size.height + 44  //  宏定义 获取当前的 状态栏的高度 和导航栏的高度
#define statusBarFrameHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define JCNew65 [[UIApplication sharedApplication] statusBarFrame].size.height + self.navigationController.navigationBar.size.height // 宏定义 获取当前的 状态栏的高度 和导航栏的高度

 

posted @ 2017-12-18 10:44  红凉梦  阅读(1222)  评论(0编辑  收藏  举报