/設(shè)備系統(tǒng)相關(guān)
#define mIsPad? ? (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) ?//是否ipad
#define mIsiphone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) //是否iPhone
#define mSystemVersion? ([[UIDevice currentDevice] systemVersion]) ?//系統(tǒng)版本
#define mCurrentLanguage ([[NSLocale preferredLanguages] objectAtIndex:0]) //獲取語(yǔ)言
#define APPBOUNDLEID [[NSBundle mainBundle] bundleIdentifier] //bundleIdentifier
#define APPNAME [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"] ?//應(yīng)用名稱(chēng)
#define APPVERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] //版本號(hào)
/*判斷設(shè)備是否是IPHONE5的屏幕*/
#define isIPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
/*判斷系統(tǒng)是否是IOS7*/
#define isIOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 ? YES:NO)
#define isIOS6 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0 ? YES:NO)
#define isIOS5 ([[[UIDevice currentDevice] systemVersion] floatValue] < 6.0 ? YES:NO)
//顏色轉(zhuǎn)換
#define mRGBColor(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
#define mRGBAColor(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
//rgb顏色轉(zhuǎn)換(16進(jìn)制->10進(jìn)制)
#define mRGBToColor(rgb) [UIColor colorWithRed:((float)((rgb & 0xFF0000) >> 16))/255.0 green:((float)((rgb & 0xFF00) >> 8))/255.0 blue:((float)(rgb & 0xFF))/255.0 alpha:1.0]
#define mScreenWidth? ? ? ? ? ([UIScreen mainScreen].bounds.size.width)//屏幕寬度
#define mScreenHeight? ? ? ? ([UIScreen mainScreen].bounds.size.height)//屏幕高度
#define mSCREEN_RATION? mScreenWidth/375.0
//頂部系統(tǒng)欄高度
#define kTopStatusBarHeight 20
#define mAppDelegate? ? ? ? (AppDelegate *)[[UIApplication sharedApplication] delegate]
#define mUserdefaults [NSUserDefaults standardUserDefaults]
#define kUDDeviceToken @"kUDDeviceToken"? //設(shè)備token