I have a view controller called searchUpdateController, it has a button to push a new view controller called editController. In the editController there is a button called Save and it contains the following code:
searchUpdateController = [[SearchUpdate alloc] init];
[self.navigationController popViewControllerAnimated:YES];
[searchUpdateController.fieldsValArray replaceObjectAtIndex:3 withObject:joinedString];
[searchUpdateController.mainTable reloadData];
[searchUpdateController release];
fieldsValArray is a NSMutableArray property in searchUpdateController and mainTable is the tableView in the searchUpdateController. I wanted to update the content of the fieldsValArray and reload the data of the tableView. Nothing happens when I click the Save button. Any ideas what I’m missing here?
Here you are creating a new objet not using the old one in the code
searchUpdateController = [[SearchUpdate alloc] init];set themsearchUpdateControllerfromSearchUpdateControllerclass. so that it point to that object that pushes theeditController