Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Swift iOS Programming for Kids

You're reading from   Swift iOS Programming for Kids Help your kids build simple and engaging applications with Swift 3.0

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787120747
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Steffen D. Sommer Steffen D. Sommer
Author Profile Icon Steffen D. Sommer
Steffen D. Sommer
Jim Campagno Jim Campagno
Author Profile Icon Jim Campagno
Jim Campagno
Arrow right icon
View More author details
Toc

Summary


This chapter went in-depth in to how we can use for-in loops to solve certain problems in our code. Along with for-in loops, we were shown how to use if-else statements, which help us write code to satisfy certain conditions. These are two very powerful tools in Swift.

We now have a pretty clear understanding as to what a type in Swift is. We've seen types, such as String, Int, Array, and Dictionary, but what if we want to make our own custom type? We will be going through how to create our own custom types in the next chapter. 

For example, if we want a type in our code to represent a Person, we will create our own Person type. An instance of this type would have a name and an address, along with a favorite ice cream flavor! It can also walk, run, and sleep. It sounds like we can solve this problem with variables and functions. This is what we will be covering in the next chapter.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime