Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚注意到我的项目中从一个类到另一个类有很多冗余代码(如菜单或按钮);)
有什么办法可以优化吗?
谢谢 !
哥提。
我确信在 Objective-C 中有#include指令
为通用代码使用类。或者在一个抽象超类上重构和创建几个类。或者使用常规的 C 函数。或者使用类别将方法添加到库函数中。