iOS中关于编译器的命令

关闭警告:

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Warc-performSelector-leaks"

[myObj performSelector:mySelector withObject:name];

#pragma clang diagnostic pop

忽略没用的变量

#pragma unused (foo)

明确定义错误和警告

#error Whoa, buddy, you need to check for zero here!

#warning Dude, don't compare floating point numbers like this!

你可能感兴趣的:(iOS中关于编译器的命令)