I have developed a few applications now all using single view controllers. In each application in the application delegate I alloc/init the first view controller in "didFinishLaunchingWithOptions" and [window addSubview: view_controller.view].
Now my question is what is best practice for removing and adding secondary views.
At the moment I do the following:
• In my current View Controller on the screen I make a reference to the Application Delegate and call a method say called "showSecondViewController" passing "self"
• Then in the Application Delegate in the "showSecondViewController" method I remove the "self" passed in from the superview and [window addSubview: new_view]; the new view controller.
I would then say several of these remove/show methods to show/hide each view controller needed.
Is this best practice? I was just talking to another iPhone developer about using instead of using this methodology using a Navigation Controller (hiding the top bar) and "animated:NO" pushing and pop'ing the view controllers? Which is best?
The reason also I started thinking about this initial was after watching the Standford University lectures and saw this slide: http://screencast.com/t/N2RkZWIzMzkt which is making me think that what I am doing is not correct.
Please advise.
Thanks James