I have a view (.xib) which consists of a tableview assigned to an array. Using the method:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
I tell the table to do a animation once a cell is selected, my question is how do I assign the table a completely new array to use for its dataSource, and reloadData before the animation occurs.
You have to do the following:
didSelectRowAtIndexPathyou have to make sure that your new table data is beeing set. That means that calling the UITableView access methods like:numberOfSectionsInTableView, cellForRowAtIndexPath, ....all will return now your new and correct values for the new table[theTableView reloadData];