Make Xcode treat "may not respond to" as errors instead of warnings
I know about the "treat warnings as errors" option in the build settings, but is there any way to set this for specific warnings only, or just for the "may not respond开发者_如何学编程s to selector X" ones?
Hmm, interesting, was Googling around and found this, if it helps - Selectively disable GCC warnings for only part of a translation unit?
following the link that Tejaswi supplied, i added this to the file and it generated an error instead of a warning:
#pragma GCC diagnostic error "-Wobjc-method-access"
by the way, getting the warning string for any warning you see in xcode can be done by clicking "reveal in log" for the warning. at the end of the log line for the warning will be the warning string in brackets.
精彩评论