Basically, I am adding items to a table in a new view and if the user hits save, I want the view to pop off, and the previous table view to update showing the new addition. Any ideas on how to accomplish this task?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PersonTableViewCell"];
if(!cell){
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"PersonTableViewCell"]autorelease];
}
p = [friendsArray objectAtIndex:[indexPath row]];
[[cell textLabel] setText:[p description]];
return cell;
}
You can try first pop the current view controller by:
Then in your table view controller’s
viewDidAppearorviewWillAppear, callto update.