I am developing an app based on the Master-View template provided by Apple (it consists of two ViewControllers, the MasterViewController and the DetailViewController). I have added a Model for communication with my server.
However, when my Model receives a message from the server, it needs to call a method in the MasterViewController or DetailViewController class. How can I do this?
All help is greatly appreciated.
You could fire notifications from the model, which are handled by the Master and Detail View controllers.
In the model:
Handle the “ReceivedData” notification in your View Controller(s):