views:

38

answers:

1

I have a tab based application with 3 tabs. How do I go about completely closing the view controller of a specific tab when it is switched? It should start again when it starts again.

Thanks for the help.

+2  A: 

If all you want is for your initialization code to run again when you switch back to that tab, move it to the -viewWillAppear: method. If you need to return things to a default state, you can do it in the -viewWillDisappear: method.

Jeff Kelley