您认为哪种方法可以在拆分视图的两端之间传递数据?您认为从主人到详细信息或从细节到主人调用方法的最佳方法是哪种?协议?塞格斯?或者......?
Which do you think the best way to pass data between the two sides of a split view? Which do you think the best way to call a method from master to detail or from detail to master? Protocols? Segues? Or...?
我在这个主题中看到过似乎是教程,但我无法弄清楚它最简单的方法。
I have seen seem tutorials in this topic but I can not figure out what is the most trivial way of it.
推荐答案如果你需要将它们用于多个 UIViewControllers ,协议是最好的方法。虽然如果您需要在两个控制器之间进行显式通信,请尝试在它们之间存储弱引用以调用方法。
Protocols are the best way if you need to use them for multiple UIViewControllers. Though if you need to explicitly communicate between two controllers, try simply storing a weak reference between them to call methods.
更多推荐
传递主数据和细节之间的值
发布评论