1.color
#define COlOR(R,G,B,A) ?[UIColor colorWithRed:(R)/255.0 green:(G)/255.0 blue:(B)/255.0 alpha:(A)]
2.屏幕大小
#define ScreenBounds [[UIScreen mainScreen] bounds]
//屏幕高度
#define ScreenHeight ScreenBounds.size.height
//屏幕寬度
#define ScreenWidth ScreenBounds.size.width
//導(dǎo)航欄
#define NAVHEIGHT ?64
#define TABBARHEIGHT ? 49
3.版本號(hào)
#define VERSION ?(NSString *)[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define SystemVersion ? [[UIDevice currentDevice] systemVersion]
4.字體
#define SystemFont(fontSize) ?[UIFont systemFontOfSize:fontSize];
#define SystemBoldFont(fontSize) ?[UIFont boldSystemFontOfSize:fontSize];
5.
#define? MPUserDefaults? [NSUserDefaults? standardUserDefaults]
#define MPNotificationCenter [NSNotificationCenter defaultCenter]
#define MPAPPLICATION ?[UIApplication sharedApplication]
#define? WINDOW? [MPAPPLICATION keyWindow]
6.
#define ? BUNDLEID ? ? (NSString *)[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"]
7.
#define CURR_LANG ? ([[NSLocale preferredLanguages] objectAtIndex:0])
#define ImageNamed(imgNameStr) ? [UIImage imageNamed:imgNameStr]
#define StrWithF(S)? ? [NSString stringWithFormat:@"%@",S]
//字符串是否為空
#define StringIsEmpty(str) ? ([str isKindOfClass:[NSNull class]] || str == nil || [str length] <1? YES : NO )
//數(shù)組是否為空
#define ArrayIsEmpty(array) ? ? (array == nil || [array isKindOfClass:[NSNull class]] || array.count ==0)
//字典是否為空
#define DictIsEmpty(dic) ? (dic == nil || [dic isKindOfClass:[NSNull class]] || dic.allKeys ==0)