There are a couple of approaches:
Implement a centralized "model" object. In this scenario, view controllers would just update properties of this main model object and there's little else you have to do. View controllers would then, in
viewDidAppear
, check the state of this model object and see if anything changed and act accordingly.Another approach would be to implement a delegate-protocol pattern, by which the various controllers might have some
delegate
property that would indicate what object must be informed of data changes. This object that would be the data delegate would be defined to conform to some well defined protocol that indicate how to inform it of the changes.If, though, you (a) have multiple objects that need to be informed of changes; and/or (b) these changes might happen asynchronously while a view is presented, you need some mechanism to do this notification. The two common approaches would be either with key-value-observing of that model object or by posting a custom notification to the
NSNotificationCenter
.
To advise you better, we'd need a better sense of the nature of your model object, whether updates are happening asynchronously in the background, etc.