Let's assume I have an address book App. So from the address list I now push to a detail view like so:
- User taps on cell in the master list
- Segue
showDetailis invoked - In
prepareForSegue:I set the model objectcontactof myContactDetailViewController viewWillAppearI add an observer forself.contact- So now when the
contactobject changes in the background, the detail view will automatically be updated. - In
viewWillDisappearI remove this observer (I guess it's clean because it is symetrical).
However, viewWillAppear: is called after I set the contact. So should I setup the KVO differently or simply call my updateView function in viewWillAppear which is a bit stupid because I want to get rid of those calls with KVO in the first place.