[Solved] how to reload whole tableview controller from other class [closed]


for that you can use Local-notification to reload the tableview controller from other class or view-controller

you need to set one observer in uitableviewcontroller .m file and trigger it from other class where you want it to reload the tableview

you can achieve this by doing this add this trigger to the other class from where you want to reload the table

 NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
[nc postNotificationName:@“reloadTable" object:self userInfo:nil]; 

after that setup this observer in tableviewcontroller class and create the receiver method

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

create this receiver method in tableviewcontroller class

-(void) reloadTable: (NSNotification* )note{
 NSLog(@"Inside : NSNotification");
[self.tableview  reloadData];

}

0

solved how to reload whole tableview controller from other class [closed]