适配宏定义代码:
#define kStatusBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height)
#define kIS_IPHONE_X (kStatusBarHeight >= 44.0f)
#define kNavigationBarNormalHeight (44)
#define kNavigationBarHeight (kNavigationBarNormalHeight + kStatusBarHeight)
#define kBottomSafeAreaHeight (IS_IPHONE_X?34:0)
#define kTabBarNormalHeight (49)
#define kTabBarHeight (kTabBarNormalHeight+kBottomSafeAreaHeight)