Teaching App Development with Swift


Level 3, Ten Lessons

Introduce students to the AV Foundation framework, and show students how to play sounds within an app. Teach asynchronous method calls with audio playback. Facilitate the reduction of repetitive code while leveraging data structures, map and closures.

The Finished App

Familiarize yourself with the project, and demonstrate the app students will build.

Lesson 1

Lead students in adding buttons and controller connections, and demonstrate how to add additional assets to an Xcode project.

Lesson 2

Introduce the AV Foundation framework and the AVAudioPlayer class. Demonstrate importing frameworks.

Lesson 3

Facilitate students in playing sounds with an AVAudioPlayer object.

Lesson 4

Teach students about asynchronous methods with four independent AVAudioPlayer objects.

Lesson 5

Challenge students to analyze controller code that belongs in a model. Facilitate constructing a NoiseMaker model to encapsulate audio playback.

Lesson 6

Discuss timely object instantiation, introduce initialization, and demonstrate the interplay between initializers and properties.

Lesson 7

Challenge students to recognize repetitive code, and demonstrate using data structures to represent collections of objects. Lead a refactoring from loops to map and trailing closures.

Lesson 8

Encourage students to continue reducing repetitive code by leveraging data structures, and provide insight into safely subscripting arrays.

Lesson 9

Teach students about the view Tag attribute, and how to identify senders within controller actions.

Lesson 10

Demonstrate how to construct image sets in an asset catalog, and add images to a user interface.

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”.