Delegates Vs. Notifications in iPhoneOS

前端 未结 7 1879
既然无缘
既然无缘 2020-12-04 06:23

I am trying to call a method in my root view controller from a child view controller such that when I change my options they will automatically update the root view, which w

7条回答
  •  失恋的感觉
    2020-12-04 07:03

    Is it really necessary for your root view controller to know about the changes, or just the subviews?

    If the root controller does not have to know, having the settings send out the notifications the other views are looking for seems like a better answer to me, as it simplifies code. There is no need to introduce more complexity than you have to.

提交回复
热议问题