I have an application with a UINavigationController with a tabBarController and multiple views.
My two main views, which correspond to two tabs, show that when loading data, a good MBProgressHUD . This is triggered by viewDidLoad and is for visibility only. Subsequent updates from the server do not use MBProgressHUD .
The problem is that viewDidLoad is called again in certain situations. I believe this is because the view is unloaded due to memory limitations and then reloaded later, which runs the code that I want to run only for the first time.
My question is: how can I make sure that this is only called when the view is first loaded, without trying to store a temporary account somewhere. All my decisions seem awful hacks. :)
Thanks!
source share