具有故事板范式的跨控制器出口是否可能?

发布于 2025-01-02 00:45:01 字数 162 浏览 3 评论 0 原文

对于 iPhone 的小型 Cocoa Touch 应用程序,我想使用界面生成器作为轻量级依赖注入。

为了实现这一点,我要么需要创建一个不属于视图控制器的“全局”对象,要么创建一个属于根视图控制器并作为出口注入的对象。

我无法实现上述任何方法吗?它们可能吗?如果可能,如何实现?

For a small Cocoa Touch application for the iPhone I would like to use the interface builder as lightweight dependency injection.

To accomplish this, I would either need to create a "global" object that does not belong to a view controller or alternatively an object that belongs to the root view controller and is injected as an outlet.

I can not able to realize any of the above mentioned methods? Are they possible and if yes, how?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文