Iphone dev 中包含的 PHP 等效项吗?

发布于 2024-08-30 11:20:02 字数 93 浏览 7 评论 0原文

我刚刚注意到我在项目中从一个类到另一个类得到了很多冗余代码(如菜单或按钮);)

有什么方法可以优化它吗?

谢谢 !

戈蒂耶。

I just noticed I get a lot of redondant code from one class to another in my project (like menus or buttons) ;)

Is there any way to optimize it ?

Thank you !

Gotye.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

违心° 2024-09-06 11:20:02

我确信 Objective-C 中有 #include 指令

I am sure there is #include directive in Objective-C

情话墙 2024-09-06 11:20:02

使用类作为公共代码。或者重构多个类并将其基于抽象超类。或者使用常规 C 函数。或者使用 类别 向库函数添加方法。

Use classes for common code. Or refactor and base several classes on an abstract superclass. Or use regular C functions. Or use categories to add methods to library functions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文