Start a Project

iOS View Controller Life Cycle

iOS View Controller Life manages a set of views and makes your app’s user interface. It coordinates with model objects and other controller objects. Basically, it plays a combined role for both view objects and controller objects. Each view controller shows it’s own views to display the app content. The views are automatically loaded when the view property of the view controller is accessed in the app.

A View Controller provides multiple methods for manage the views.

iOS View Controller Life Cycle structure

loadView

View Did Load Method

View Did Appear Method

The viewDidAppear the method is called after the root view is displayed. This method is commonly overridden to initiate processor-intensive work that otherwise could cause sluggishness in presenting the view.

View will Appear Method

This method is called every time when the view appears.

View Did Appear Method

This method is called after the view present on the screen

View Will Disappear Method

This method called before the view are remove from the view hierarchy

View did disappear Method

View will layout Subviews Method

View Did Layout Subviews Method

Conclusion

Thanks for reading this blog, this will help you to learn view life cycle and You can get other blogs from here.

So pls follow the above step and And if you have any issue or suggestion you can leave your message in the comment section I will try to solve this.

Exit mobile version