I have a split view controller in which either side has table views and needs table data reloading every time some interaction happens on either side. I have implemented delegate to update my detail view controller whenever a cell is selected on left side (master) of split view controller.
1.I wish to know do I need to implement another delegate to make it happen both ways (i.e. updating master view when a )or is there any generic approach.
2.I have already written code for both classes, so what is happening is that when i select a cell on left , right updates via a delegate method reloading/refreshing the view BUT the methods like viewWillAppear/viewDidAppear/viewWillDisapper ...etc are not called. I am now manually calling viewWillAppear method from the delegate Method that's triggered on left cell selection. Is there a technique i am missing so that the class methods are called automatically. or Can anyone point to the best approach to use a splitViewController?
You probably need to use one of the
reload...methods of UITableView to reload the table. ThereloadDatamethod will reload the complete table. If you know which rows are changed, then it is probably better to use one of the other methods. If the changes are also in the number of row, then you'll need to use one of theinsert...ordelete...methods to get proper animations. See the UITableView documentation for all the details.For your first question, I would expect the detail view controller to have the master as a delegate. But the master should simply know which detail view controller is on the right. After all, he has started it.