问题
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