Error on p 221 Appearing and disappearing views


#1

On returning to ItemsViewController, shouldn’t [[self tableView] reloadData] be in -(void)viewDidAppear ?

I can’t get the table to refresh without a revisit to DetailViewController and then back to ItemsViewController unless I refresh there…


#2

Works OK for me as written.

Ron


#3

[quote]On returning to ItemsViewController, shouldn’t [[self tableView] reloadData] be in -(void)viewDidAppear ?

I can’t get the table to refresh without a revisit to DetailViewController and then back to ItemsViewController unless I refresh there…[/quote]

Same here, I removed viewWillAppear and put it inside ViewDidAppear instead and then voila it works. Don’t know why, anyone have any pointers why it works in ViewDidAppear and not in ViewWillAppear??


#4

In DetailViewController.m, are you implementing viewDidDisappear or viewWillDisappear?

If you are implementing viewDidDisappear, the reload happens before your data is changed. Change it to viewWillDisappear.