Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MontyClift

macrumors newbie
Original poster
Sep 2, 2008
18
0
I have an app that uses navigationcontroller.
I'm fine pushing new controllers onto the stack and popping them back.
However I cant figure out how to handle a view being reactivated this way.
So for example if I start on screen a. The users presses a button and screen b pushes in. The user interacts with screen b and then I call
[self.navigationController popViewControllerAnimated:YES];
to get me back out to screen a.
However on screen a reappearing I want to perform some logic but I cant figure out how to capture the actual event that popViewController has created.

Any help greatly appreciated.
 
The view controller of the view that appears will get a viewWillAppear and a viewDidAppear message if you implement them. Have a look at the UIViewController documentation.
 
Perfect, thanks for that I was trying to use ViewDidLoad which obviously only gets fired on the initial load
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.