【发布时间】:2012-07-28 13:57:02
【问题描述】:
我有以下问题,需要一个模式来解决它:
为了简单起见,我有两个视图,MasterViewController 和 PreferencesController,最后一个是第一个的弹出窗口。 PrefController 已将一些方法委托给 MasterController。
但现在我想从 PreferencesController 中捕获 Popover-Event 并通知 MasterController。
最好的方法是什么?我现在也不想在另一个方向使用代表,这似乎是一个很好的解决方案。我考虑过为此创建一个事件,但您可能对这种情况有更好的建议/解决方案。
提前致谢
【问题讨论】:
-
你的结构中的某些东西并不真正有意义 - 如果 PreferencesController 是一个弹出窗口,为什么 PreferencesController 是 MasterController 的代表?我希望弹出窗口有一个委托属性,以便将信息传递回主控制器,而不是相反。
标签: ios xcode ipad events communication