Comprehensive answer: "It depends on the life cycle of your presentation." Each method has its own place regarding how your views will load and appear.
However, as a rule, viewDidLoad is a good default place to go first - your XIB views are already created, so you can set their properties. If you load and unload views a lot, you may need to pull clean data, which is pretty static for your init calls.
viewWillAppear is another option, depending on the life cycles of your views and how much your data may change while the view is hidden.
ETA: Release your memory in additional calls to where you allocated it. In dealloc , viewDidUnload or viewDidDisappear . didReceiveMemoryWarning should always unload anything, no matter where you initialized it, and your code should be smart enough to reload data as soon as it is active.
source share