iOS:如何在其他类中调用本类的方法

宏定义 - 传递函数、参数

do { \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Warc-performSelector-leaks\"") \
Stuff; \
_Pragma("clang diagnostic pop") \
} while (0)

使用:
SuppressPerformSelectorLeakWarning([self performSelector:method withObject:value]);

value:需要传递的参数
self:本类对象

猜你喜欢

转载自blog.csdn.net/qq_15289761/article/details/106828545