When you pop a view and go back to previous view then 'viewWillAppearand
viewDidAppear` methods of view controller are called.
Following is the calling hierarchy -
viewDidLoad
- This method is called after the view controller has loaded its view hierarchy into memory.
viewWillAppear
- This method is called before the receiver’s view is about to be added to a view hierarchy.
viewDidAppear
- Notifies the view controller that its view was added to a view hierarchy.
Checkout UIViewController class reference for details of these view controller life cycle methods - http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html
So based upon requirement, you need to decide and what all UIElement you want to be loaded only once use in viewDidLoad
and element on which you want to do refresh upon returning use viewWillAppear
or viewDidAppear
.