#define kWeakSelf(weakSelf) __weak __typeof(self)weakSelf = self;xcode
#ifndef __OPTIMIZE__#define NSLog(...) NSLog(__VA_ARGS__)#else# define NSLog(...) {}#endifapp
#ifdef DEBUG函數
#define NSLog(...) NSLog(__VA_ARGS__)oop
#elsespa
#define NSLog(...).net
#endif指針
#define SCREEN_FRAME ([UIScreen mainScreen].applicationFrame)code
#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)orm
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)blog
「-Wincompatible-pointer-types」爲警告類型
clang爲編譯器名,這裏也能夠替換爲GCC
#pragma clang diagnostic ignored後面只能跟一個忽略警告類型若是須要同時忽略多種警告,須要這樣寫: