Skip to Main Content
Swift for Beginners: Develop and Design, Second Edition
book

Swift for Beginners: Develop and Design, Second Edition

by Boisy G. Pitre
December 2015
Beginner content levelBeginner
336 pages
9h 13m
English
Peachpit Press
Content preview from Swift for Beginners: Develop and Design, Second Edition

Chapter 3. Taking Control

In the last chapter, you spent some time getting to know Swift’s collections: arrays and dictionaries. Then you started looking at ways to iterate through those collections. In this chapter, you’ll continue looking at iteration and then move on to Swift’s ability to take directions on what to do at specific intervals.

If you haven’t already done so, start up the REPL in the Terminal application (remember, you can type xcrun swift to get it going). The line numbers in the figures in this chapter assume that you are starting with a fresh REPL session.

For What It’s Worth

As you saw in the previous chapter, Swift’s ability to iterate through a collection, be it an array or a dictionary, uses the for-in loop. Other variations ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Swift for Beginners: Develop and Design

Swift for Beginners: Develop and Design

Boisy G. Pitre
Swift For Dummies

Swift For Dummies

Jesse Feiler

Publisher Resources

ISBN: 9780134289793Purchase book