The viewwillappear method is called how and when a view controller view is added to the window. (if the view is already in the window and hidden by another view, this method is called when the view opens again). This method is a notification to the view manager that the view should become visible. You can override this method to make any adjustments when presenting a view.
source share