// // HDLLinphoneUtlis.h // VoipTest // // Created by 陈嘉乐 on 2021/8/2. // #import // APP Screen #define APP_SCREEN_BOUNDS [[UIScreen mainScreen] bounds] #define APP_SCREEN_HEIGHT (APP_SCREEN_BOUNDS.size.height) #define APP_SCREEN_WIDTH (APP_SCREEN_BOUNDS.size.width) #define APP_STATUS_FRAME [UIApplication sharedApplication].statusBarFrame // 是否是IPhoneX的设备 #define IPhoneX ([UIApplication sharedApplication].statusBarFrame.size.height >= 44) #define APP_TOP_BAR_HEIGHT (IPhoneX ? 88 : 64) #define APP_STATUS_BAR_HEIGHT (IPhoneX ? 44 : 20) #define APP_TOOL_BAR_HEIGHT 49 #define APP_TAB_BAR_HEIGHT (IPhoneX ? (49 + 34): 49) #define APP_TAB_BOTTOM_HEIGHT (IPhoneX ? 34 : 0) #define APP_CONTENT_WIDTH (APP_SCREEN_BOUNDS.size.width) #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_TAB_BOTTOM_HEIGHT) #define APP_CONTENT_HEIGHT_2 (APP_SCREEN_HEIGHT - APP_STATUS_BAR_HEIGHT - APP_TAB_BAR_HEIGHT) #define APP_UIFont @"PingFangSC-Regular" #define APP_UIFont_BOLD @"PingFangSC-Semibold" #define DesignWidth 375 #define DesignHeight 667 #define GetRealWidth(W) W / (DesignWidth * 1.0f / APP_SCREEN_WIDTH) #define GetRealHeight(H) H / (DesignHeight * 1.0f / APP_SCREEN_HEIGHT) #define TextColor HEXCOLORA(0x1B2D4D, 1.0) #define TextSelectColor HEXCOLORA(0x4484F4, 1.0) /** WEAKSELF_AT */ #define WEAKSELF_AT __weak __typeof(&*self)weakSelf_AT = self; #define HEXCOLORA(rgbValue, a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:a] #define RTSP_Result_String(enum) [@[ @"0", @"1", @"2", @"3", @"4", @"5", @"6", @"7", @"99", @"100" ] objectAtIndex:enum] NS_ASSUME_NONNULL_BEGIN @interface HDLLinphoneUtlis : NSObject @end NS_ASSUME_NONNULL_END