Book Image

Swift 2 Blueprints

By : Cecil Costa
Book Image

Swift 2 Blueprints

By: Cecil Costa

Overview of this book

In this book, you will work through seven different projects to get you hands-on with developing amazing applications for iOS devices. We start off with a project that teaches you how to build a utility app using Swift. Moving on, we cover the concepts behind developing an entertainment or social networking related application, for example, a small application that helps you to share images, audio, and video files from one device to another. You’ll also be guided through create a city information app with customized table views, a reminder app for the Apple Watch, and a game app using SpriteKit. By the end of this book, you will have the required skillset to develop various types of iOS applications with Swift that can run on different iOS devices. You will also be well versed with complex techniques that can be used to enhance the performance of your applications.
Table of Contents (15 chapters)
Swift 2 Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Displaying the fridge's status


Once we are able to add stuff to our fridge, we need to create another scene to display the current fridge's status. In this scene, we are going to use UIProgressView because it is more visual than just writing a number on a label.

Go back to the storyboard and add a new view controller to it. Drag five labels, two buttons, and three progress views to the scene as follows.

  1. Place the first label at the top and set its title to Fridge Status.

  2. Place the second label under the first one without a title or, if you prefer, you can just add a dash to locate it easily. This label will be used to report to the user the supplies that are running out of stock.

  3. Under the message label, place one button and set its title to Go to the supermarket.

  4. You can place the other three labels with a progress view under each one. Set the labels' title to Drink, Food, and Dessert.

  5. Lastly, place the second button at the bottom of the scene and set its title to Back.

In the end, you should...