A natural place to start out with Swift and Xcode is to build Single View Applications. This is a great template that Xcode provides and is a great starting point for almost every project. But as you grow your applications you begin to need more than one screen or view and hence more than one view controller. Most applications, except the most basic, consist of more than one view controller and it is your job as an iOS developer to manage the communication between your multiple view controllers to create your app's UX workflow. In this post I will cover how to add multiple view controllers to a Swift iOS app, how to transition from one view controller to another using navigation controllers and segues, and how to pass data from one view controller to another.
I will be using a clean code demo project available on github that you can use as a reference to follow along the step-by-step.
The Step-by-Step:
0. Start a new Single View Application so that you have a starting point.
Name your project and set the project options.
After choosing a place to save your project you will have your starting point: an app that has a single view. The classic "Hello, World" tutorial would have you place a UILabel on that View. Run the App and see it http://www.inparkmagazine.com/eleetus-simulator/
View User's Journal
automechanic99 Journal
automechanic99 Personal Journal
|