Last active
December 10, 2015 19:00
-
-
Save qyzhaojinxi/35b141b114454cce3402 to your computer and use it in GitHub Desktop.
AppConfig #ios开发app配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] | |
#define BUNDLEID [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] | |
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height | |
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width | |
#define IS_IOS7 (BOOL)([[[UIDevice currentDevice] systemVersion]floatValue]>=7.0 ? YES : NO) | |
#define IS_IOS8 (BOOL)([[[UIDevice currentDevice] systemVersion]floatValue]>=8.0 ? YES : NO) | |
#define ApplicationDelegate ((AppDelegate *)[UIApplication sharedApplication].delegate) | |
#define WEAKSELF typeof(self) __weak weakSelf = self; | |
#define STRONGSELF typeof(weakSelf) __strong strongSelf = weakSelf; | |
// | |
#if DEBUG | |
#define NSLog(FORMAT, ...) fprintf(stderr,"\n%s line:%d content:%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); | |
#else | |
#define NSLog(FORMAT, ...) nil | |
#endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment