I have a viewcontroller showing the detail of a book. What I want to do is saving data to database in a background thread before the viewcontroller is poped from the navigationcontroller.
I don't know where to put the logic save data to database, viewWillDisappear or deinit are the right choices?
I think you just need to create a global service which call to do anything you want to save. Then call it with data in your
viewDidDisappeared()