In a master-detail application, I have the following layout;
Master Let's assume we have a UITableView here
Detail Shows more information about a item from the Master. We setup a observer in NSNotificationCenter here
DetailModal Shows something, is shown from Detail
Where is the correct way of calling removeObserver
if I still want to receive notifications when Detail or DetailModal is shown but remove it when we go back to Master?
The way I see it, I would set a flag to not remove the observer when showing the DetailModal and check for that flag in viewWillDissapear
. Is this a good approach?