iOS中关于编译器的命令

2017-03-29  本文已影响47人  李贤立

关闭警告:

#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!

上一篇 下一篇

猜你喜欢

热点阅读