IPhone Dev: Reload data of a table view from a child controller and another controller in a TabBar


I'm implementing a notes manager application which has a tableView in a tabBar where the main information of its notes is displayed. When accessing to one note, you can edit its properties. In one button of the tabBar you can choose the way the notes are displayed in the tableView.

The problem I have is that I don't know how to reload the data from a child controller or from the other controller of the tabBar, either. I don't know how to refer to tableView from them so I can use reloadData to update the information of the TableView from them.

I'm quite new in iPhone development… any help will be really appreciated.

Best Solution

You should try NSNotificationCenter.

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomething:) name:@"doSomethingNotification" object:nil];

[[NSNotificationCenter defaultCenter] postNotificationName:@"doSomethingNotification" object:nil];
Related Question