Clock
Level 2, Six Lessons
Dive in with everyone's essential iOS app: the clock. Teach students about Interface Builder, UILabels, IBOutlets, models, views, controllers, NSTimer and how to handle device orientation.
The Finished App
Familiarize yourself with the project, and demonstrate the app students will build.
Lesson 1
Demonstrate adding user interface elements with Interface Builder, and establishing outlet connections between controllers and views.
Lesson 2
Explain the MVC pattern, and demonstrate adding a new class to a project. Compare methods to computed properties.
Lesson 3
Demonstrate application and controller lifecycle methods when starting, backgrounding, foregrounding, and force-quitting an app.
Lesson 4
Introduce NSNotificationCenter, and demonstrate using notifications and observers.
Lesson 5
Explain the concept of run loops, and demonstrate periodic execution with NSTimer.
Lesson 6
Demonstrate how to handle device orientation changes.
The course materials only, and not any other content of this web page, are to be used pursuant to a Creative Commons license, as specified in the license information within the course materials.
Trademark Information
The Swift logo, Apple, the Apple logo and other Apple trademarks, service marks, graphics, and logos used in connection with the Swift Education project are trademarks or registered trademarks of Apple Inc. in the US and/or other countries. Other trademarks, service marks, graphics, and logos used in connection with the Swift Education project may be the trademarks of their respective owners. You are granted no right or license in any of the aforesaid trademarks, and further agree that you shall not remove, obscure, or alter any proprietary notices (including trademark and copyright notices) that may be affixed to or contained within the Service.
For further information about proper referential uses of the Swift logo, please review the “Guidelines for Using Apple Trademarks and Copyrights”.