我不是一个好开发者 谁能告诉我这些代码的含义是什么? 就像......其他......;
一样简单#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
// code here
#pragma clang diagnostic pop
答案 0 :(得分:1)
该代码使您可以忽略
之间的编译器警告#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
和
#pragma clang diagnostic pop
答案 1 :(得分:0)
考虑一个你正在编写未实现的执行选择器的场景。但如果你不想要那个警告。请声明如下:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self.ticketTarget performSelector: self.ticketAction withObject: self];
#pragma clang diagnostic pop