- 1 警告:PerformSelector may cause a leak because its selector is unknown
- 原因:是因为你使用控制器来加载performSelector:方法导致,由于ios运行时在arc下的消息机制是根据方法的返回值来处理的,而使用performSelector:不确定返回值是什么类型的,因此会有警告。
- 处理方法:
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
- [self performSelector:funcName];
- #pragma clang diagnostic pop
未完待续
来源:oschina
链接:https://my.oschina.net/u/2682077/blog/706204