这个问题在这里已经有了答案:
Best Answer-推荐答案 strong>
您可以通过在接口(interface)文件中的方法声明后面添加 __attribute__((objc_requires_super))
来实现此功能
- (void)myBaseClassMethod __attribute__((objc_requires_super));
将此添加到方法声明后,您将在所有子类中收到以下警告:
关于ios - 忘记调用 super 时收到警告,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/23672726/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) |
Powered by Discuz! X3.4 |