Reload root view controller
cocoa-touch, ios, objective-c, uinavigationcontroller, uiviewcontroller
Solution
You should process `viewWillAppear:` or `viewDidAppear:`, depending on whether you'd like a reload to happen before or after thew view shows up on the screen. `viewDidLoad` is called only once, when the view is loaded.
Problem
I am working with a `UINavigationController` in my app. In `viewDidLoad`, the root view controller acquires information from the internet, parses it, and displays it. When going to another view in the `UINavigationController`, and then going back to the root `UIViewController`, the information in the controller is not reloaded. This leads me to think that `viewDidLoad` is not being called. What method should I use to ensure this information is reloaded when the root view controller is popped back to in the `UINavigationController`? Edit: Thanks for the quick responses guys, it means a lot. One more question regarding your answers: `viewWillAppear` or `viewDidAppear`? Are there pros/cons for each?