I have 2 classes, classA and classB In classA I have a tableview that works and refreshes on demand. all the delegates and datadource are fine and there\'s also a property <
Use delegates to reload your tableview.
In the class where the tableview is, write this in viewDidLoad:
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"updateLeftTable"
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(checkRes:) name:@"updateLeftTable" object:nil];
Then in the same class implement its function like so:
-(void)checkRes:(NSNotification *)notification
{
if ([[notification name] isEqualToString:@"updateLeftTable"])
{
[_rearTableView reloadData];
}
}
Finally, in the class from where you want to reload your tableview paste the following line (It's important that this line goes in the method from where you want to reload your tableview):
[[NSNotificationCenter defaultCenter] postNotificationName:@"updateLeftTable" object:self];
Tell me if you have any problems.