Reputation: 1579
I have a Main View which call a settings panel in another view with the page curl transition. All seems fine, but when I close the settings view it doesn't trigger the "viewWillAppear" method of my Main View causing me a lot of troubles because it doesn't get updated with the settings.
There is an answer which seems fine for me, but I don't know how to implement it. There is another easy way or someone who can explain to me how to apply that answer?
Thanks in advance.
Upvotes: 0
Views: 400
Reputation: 21902
Instead of reacting to views, you should probably react to settings changes. What I mean by that is that it would be a more solid design to use Key-Value Observing (KVO) so that your main view can be notified of changes to the objects that represent your settings.
Alternatively, if you can't or don't want to observe a specific object, you can use NSNotificationCenter
and have your settings view fire a notification when the new settings are applied and your other view can register to listen to those notifications.
Here is a simple example of that.
I hope this helps solve your problem.
Upvotes: 1