Pass values between master and detail

别来无恙 提交于 2020-01-07 04:05:21

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/8770587/pass-values-between-master-and-detail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!