i want change the content of a UITableView when i change a button, how i can do it?…i retrieve my information from Core Data, and when i press a button i want change the information in the tableview, i know the:
[self.tableview reloadData]
and in this way i give the information to the row:
NSManagedObject *name = [[self sortName] objectAtIndex:indexPath.row];
cell.textLabel.text = [[name valueForKey:@"firstName"] description]];
but my question is how i can give another array to my table view to retrieve information when i tap a button…i every where but i can’t find an answer…
The information displayed in your table view cells are determined in the cellForRowAtIndexPath method.
In your code, it looks like this method references your array named sortName.
If you are retrieving your new data set into some other array, then you have to replace the contents of sortName with the contents of the new array.