Book Image

Swift Essentials

By : Alex Blewitt, Bandlem Limited
Book Image

Swift Essentials

By: Alex Blewitt, Bandlem Limited

Overview of this book

Table of Contents (16 chapters)
Swift Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 4. Storyboard Applications with Swift and iOS

Storyboards were introduced in Xcode 4.2 with iOS 5.0. Storyboards solved the problem of being able to graphically present the flow of screens in an iOS application and also provided a way to edit the content of those screens in one place instead of many separate xib files. Storyboards work in the same way with Swift as with Objective-C, and the Swift and Storyboards section shows how to integrate Swift code with storyboard transitions.

This chapter will present the following topics:

  • How to create a storyboard project

  • Creating multiple scenes

  • Using segues to navigate between scenes

  • Writing custom view controllers

  • Connecting views to outlets in Swift

  • Laying out views with Auto Layout

  • Using constraints to build resizable views