The UIViewController life cycle

As the requirements for our UI grow, we need to have more granular control of our views. We need to be able to tell what state our view is currently in inside our code. Is it, for example, shown or did the user just close the app? Is the app currently navigating from one view to another or is it just about to be shown, but still loading. All of these states refer to the  life cycle of the UIViewController, which is very important when we want to build a great UI. The life cycle of a view can be overwhelming to dive into, but often we only need a couple of these states in order to make our UIs as we want them to be. The way we handle these states is by implementing certain methods defined by Apple. Then, Apple guarantees ...

Get Swift iOS Programming for Kids now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.