© Wallace Wang 2019
Wallace WangPro iPhone Development with Swift 5https://doi.org/10.1007/978-1-4842-4944-4_5

5. Understanding the Application Life Cycle

Wallace Wang1 
(1)
San Diego, CA, USA
 

Every time you create an iOS project, it will likely include at least two .swift files: ViewController.swift and AppDelegate.swift. A ViewController.swift file connects to a scene in a storyboard and lets you write code that manages the user interface. Each time you add another view controller scene to the storyboard, you’ll likely need another ViewController.swift file (under a different name) to manage any user interface objects such as buttons, text fields, or switches.

Where a project can have multiple ViewController.swift files connected to different scenes ...

Get Pro iPhone Development with Swift 5: Design and Manage Top Quality Apps 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.