iOS常用宏定义

回眸只為那壹抹淺笑 提交于 2020-02-26 10:08:41

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

 

#define SCREEN [[UIScreen mainScreen] bounds]

#define kSpaceX 50

#define Helvetica @"Helvetica Neue"

#define HelveticaBold @"Helvetica-Bold"

#define kDocumentPath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]

 

#define RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]

#define RGBACOL OR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

 

#define LineColor RGBCOLOR(204, 204, 204)

 

#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]

 

#define IsiPhone4s ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)

#define LINEIMAGECOLOR [UIColor colorWithRed:212.0/255.0 green:212.0/255.0 blue:212.0/255.0 alpha:1]

#define IsiPhone5s ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)

 

#define TABBAR_HEIGHT   49.f

#define TABBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/5)

#define TABBAR_TAP_BUTTON_WIDTH_T  ([UIScreen mainScreen].bounds.size.width/4)

#define TABCHATBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/3)

#define TABMONEYBAR_TAP_BUTTON_WIDTH  ([UIScreen mainScreen].bounds.size.width/4)

 

#define NAVBAR_IOS7_HEIGHT (IOS_VERSION>=7.0?64.f:0.f)

 

#define Map_Height ([UIScreen mainScreen].bounds.size.height-200.f-NAVBAR_IOS7_HEIGHT)

#define Map_Height_TabBar ([UIScreen mainScreen].bounds.size.height-200.f-TABBAR_HEIGHT-NAVBAR_IOS7_HEIGHT)

 

#define Iphone_WaitView_Width  100.f

#define Iphone_WaitView_Height 100.f

#define KscreenHeigh           [[UIScreen mainScreen] bounds].size.height

#define KscreenWidth           [[UIScreen mainScreen] bounds].size.width

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!