Book Image

Swift iOS Programming for Kids

By : Steffen D. Sommer, Jim Campagno
Book Image

Swift iOS Programming for Kids

By: Steffen D. Sommer, Jim Campagno

Overview of this book

This book starts at the beginning by introducing programming through easy to use examples with the Swift Playgrounds app. Kids are regularly encouraged to explore and play with new concepts to support knowledge acquisition and retention – these newly learned skills can then be used to express their own unique ideas. Children will be shown how to create their first iOS application and build their very own movie night application.
Table of Contents (21 chapters)
Swift iOS Programming for Kids
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
2
Getting Set Up

Chapter 8. Smarter Toy Bin

In any iOS application, there are certain conditions that need to be met before we do something. For example, if we're hungry, we should eat! If we're tired, we should go to sleep. Along with working with conditions like this, we will also take a closer look at working with collection types.

This chapter will introduce you to the following tools in Swift:

  • For loops, which allow us to iterate over collections, sequences, and strings to be able to read all the values contained within them

  • If-else statements to satisfy certain conditions, such as if I'm hungry, then I should eat!