View Controller Life Cycle Methods init(coder)/init(nibName:bundle:): Called when the view controller is created programmatically or via Storyboard. loadView() Creates the view for the view controller (usually overridden if creating views manually). viewDidLoad() Called once when the view is loaded into memory. viewWillAppear() Called before the view appears on the screen …
Application Life Cycle
The app transitions through the following states in its life cycle: The application life cycle is managed by the AppDelegate and SceneDelegate. 1.application(_:didFinishLaunchingWithOptions:) 2.applicationDidBecomeActive(_:) 3.applicationWillResignActive(_:) 4.applicationDidEnterBackground(_:) Called when the app enters the background. 5.applicationWillEnterForeground(_:) Called as the app transitions from background to foreground. 6.applicationWillTerminate(_:) Called when the app is about …
Lazy Properties
A lazy property is a property whose initial value is not calculated until the first time it is accessed.