【发布时间】:2013-05-23 08:27:22
【问题描述】:
我正在解决一个问题,我有一个 ViewController,它在按下按钮时打开一个 popOver,然后在 popOver 中您可以编辑一些影响母 ViewController 中显示的内容的设置(例如更改视图,在那里更改地图或表格)。每当 popOver 被解除时,这当然可以被调用,但它需要是最新的。
我尝试使用委托,我可以在其中传递数据或调用函数,但该函数不会在 ViewController 上启动,而 ViewController 是不活动的,对吧? 我也尝试了 NSNotifications,但也没有用。
我在stackoverflow上发现了几个这样的问题,但还没有真正的答案:
UIPopoverController button selecting method of another ViewController but not updating its view iOS
Refresh a WebView in a ViewController from another ViewController
有人可以用一些代码sn-ps解释一下如何解决这个问题吗?
【问题讨论】:
标签: ios uiviewcontroller uipopovercontroller