| | |
| | | #define IOS9 (TP_SYSTEM_VERSION >= 9.0) |
| | | #define IOS10 (TP_SYSTEM_VERSION >= 10.0) |
| | | |
| | | //是否是IPhoneX的设备 |
| | | #define IPhoneX ([[UIScreen mainScreen] bounds].size.height == 812) |
| | | //是否是 iPhoneX_XS_11Pro设备 |
| | | #define IPhoneX ([UIScreen mainScreen].bounds.size.width == 375.0f && [UIScreen mainScreen].bounds.size.height == 812.0f) |
| | | //是否是 iPhoneXSMax_XR_11_11ProMax |
| | | #define IPhoneXR ([UIScreen mainScreen].bounds.size.width == 414.0f && [UIScreen mainScreen].bounds.size.height == 896.0f) |
| | | // 是全面屏手机 |
| | | #define IsFullScreen (IPhoneX || IPhoneXR) |
| | | |
| | | // Screen |
| | | #define APP_SCREEN_BOUNDS [[UIScreen mainScreen] bounds] |
| | |
| | | #define APP_SCREEN_WIDTH (APP_SCREEN_BOUNDS.size.width) |
| | | #define APP_STATUS_FRAME [UIApplication sharedApplication].statusBarFrame |
| | | |
| | | #define APP_TOP_BAR_HEIGHT (IPhoneX ? 88 : (IOS7 ? 64 : 44)) |
| | | #define APP_STATUS_BAR_HEIGHT (IPhoneX ? 44: (IOS7 ? 20 : 0)) |
| | | #define APP_STATUS_BAR_HEIGHT_TURE (IPhoneX ? 44: (IOS7 ? 0 : 0)) |
| | | #define APP_TOP_BAR_HEIGHT (IsFullScreen ? 88 : (IOS7 ? 64 : 44)) |
| | | #define APP_STATUS_BAR_HEIGHT (IsFullScreen ? 44: (IOS7 ? 20 : 0)) |
| | | #define APP_STATUS_BAR_HEIGHT_TURE (IsFullScreen ? 44: (IOS7 ? 0 : 0)) |
| | | #define APP_TOOL_BAR_HEIGHT 49 |
| | | #define APP_TAB_BAR_HEIGHT (IPhoneX ? (49 + 34): 49) |
| | | #define APP_TAB_BAR_HEIGHT (IsFullScreen ? (49 + 34): 49) |
| | | #define APP_CONTENT_WIDTH (APP_SCREEN_BOUNDS.size.width) |
| | | #define APP_BUTTOM_HEIGHT (IPhoneX ? 34: 0) |
| | | #define APP_BUTTOM_HEIGHT (IsFullScreen ? 34: 0) |
| | | #define APP_CONTENT_HEIGHT (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT - APP_TAB_BAR_HEIGHT) |
| | | #define APP_VISIBLE_HEIGHT (APP_SCREEN_HEIGHT - APP_TOP_BAR_HEIGHT - APP_BUTTOM_HEIGHT) |
| | | #define APP_B_HEIGHT (APP_SCREEN_HEIGHT - APP_BUTTOM_HEIGHT) |