Skip to main content
InterviewHubPRO
Section Overview
Q29

Question 29 of 50

Part 3: Instruments Profiling, App Architecture & Production Hardening (25 - 35)

58%
iOS Platform & SwiftUI (50 Qs)•Part 3: Instruments Profiling, App Architecture & Production Hardening (25 - 35)

What is the UIKit View Controller Lifecycle (viewDidLoad, viewWillAppear, viewDidLayoutSubviews)?

senior LevelLifecyclePerformanceSystem Design

In Simple Words:

  1. loadView: Instantiates the root view.
  2. viewDidLoad: Called once when view hierarchy is in memory; ideal for initial setup.
  3. viewWillAppear / viewDidAppear: Called every time view transitions onto screen.
  4. viewDidLayoutSubviews: Called after Auto Layout computes final subview frames.