When using UITabBar, your views are kept alive unless a warning about saving memory is received and need to be freed. Since they are constantly stored, viewDidLoad will be called only once (if your view is not unloaded due to a memory warning).
viewWillAppear and viewDidAppear will be called each time this view is displayed on the screen, so you want to update the view or data.
viewWillAppear is best used in cases where you want to update something in the view before the user sees it. For example, setting up UILabels or UITextFields to clear data. This will prevent the user from seeing a quick flash of old data before clearing it. Running anything in this method that will consume significant system resources or take a lot of time (i.e. Webservices) can slow down your application and prevent you from showing UIActivityIndicator at the same time, since this is before the view really appears .
viewDidAppear is useful for anything that can be updated after the view has already been shown, such as the web services from the previous example.
source share