Skip to content

Instantly share code, notes, and snippets.

@qyzhaojinxi
Last active December 10, 2015 19:00
Show Gist options
  • Save qyzhaojinxi/35b141b114454cce3402 to your computer and use it in GitHub Desktop.
Save qyzhaojinxi/35b141b114454cce3402 to your computer and use it in GitHub Desktop.
AppConfig #ios开发app配置
#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