Please tell me how to update Array before exiting TableViewController
.h file
@interface DaysTableViewController : UITableViewController{ NSArray * indexPathArray; IBOutlet UITableView *tableViewList; } .m file
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; cell.accessoryType = UITableViewCellAccessoryCheckmark; indexPathArray = [tableViewList indexPathsForSelectedRows]; } - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; cell.accessoryType = UITableViewCellAccessoryNone; indexPathArray = [tableViewList indexPathsForSelectedRows]; }
(void)viewWillDisappear{ NSLog(@"%@", indexPathArray); [tableViewList reloadData]; }(void)viewWillDisappear{ NSLog(@"%@", indexPathArray); [tableViewList reloadData]; }(void)viewWillDisappear{ NSLog(@"%@", indexPathArray); [tableViewList reloadData]; }but nothing advertises on exit - Void