Swift
Apprentice
Sixth Edition
By the raywenderlich Tutorial Team
Ehab Amer, Alexis Gallagher, Matt Galloway, Eli Ganim,
Ben Morrow & Cosmin Pupz
Swift Apprentice
Ehab Amer, Alexis Gallagher, Matt Galloway, Eli Ganim, Ben Morrow & Cosmin Pupz
Copyright 2020 Razeware LLC.
Notice of Rights
All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by any means without prior written permission of the copyright owner.
Notice of Liability
This book and all corresponding materials (such as source code) are provided on an as is basis, without warranty of any kind, express of implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in action of contract, tort or otherwise, arising from, out of or in connection with the software or the use of other dealing in the software.
Trademarks
All trademarks and registered trademarks appearing in this book are the property of their own respective owners.
Dedications
Thanks to my family for their unconditional support, and my beautiful Merche for being a wonderful blessing.
Ehab Amer
To my wife and kids -- Ringae, Odysseus, and Kallisto.
Alexis Gallagher
To my amazing family who keep putting up with me spending my spare hours writing books like this.
Matt Galloway
To my loved ones: Moriah, Lia and Ari.
Eli Ganim
For MawMaw. A talented cook, a loving smooch, a worthy opponent in chicken foot; a home weaver. Her blessing abides beyond her time.
Ben Morrow
To my awesome girlfriend Oana, my sweet dogs Sclip and Nori and my lovely cats Grisi and Porto for believing in me all the way.
Cosmin Pupz
About the Authors
Ehab Amer is an author of this book. He is a very enthusiastic Lead iOS developer with a very diverse experience, from building games to enterprise applications and POCs, especially when exploring new technologies. In his spare time, TV shows take the majority, followed by video games. When away from the screen, he goes with his friends for escape room experiences or to explore the underwater world through diving.
Alexis Gallagher is an author of this book. Hes worked in business consulting, scientific research, iOS development, startup management and theater. Favorite insult? Unthoughtful. Favorite color? Green. Favorite way of writing dates? 1970-01-01, he will fight you on that. Perhaps the only software engineer in San Francisco who was born there, he lives there now with his wife, kids, and --soon-- a dog!
Matt Galloway is an author of this book. He is a software engineer with a passion for excellence. He stumbled into iOS programming when it first was a thing, and he has never looked back. When not coding, he likes to brew his own beer.
Eli Ganim Eli Ganim is an author of this book. He is an iOS engineer whos passionate about teaching, writing and sharing knowledge with others. He lives in Israel with his wife and kids.
Ben Morrow is an author of this book. He delights in discovering the unspoken nature of the world. Hell tell you the surprising bits while on a walk. He produces beauty by drawing out the raw wisdom that exists within each of us.
Cosmin Pupz is an author of this book. He is a tutorial writer from Romania. He has worked with more than a dozen programming languages over the years, but none has made such a great impact on himself as Swift. When not coding, he either plays the guitar or studies WWII history.
About the Editors
Steven Van Impe is the technical editor of this book. Steven is a computer science author and lecturer at the HOGENT University of Applied Sciences in Belgium. You can find Steven on Twitter as @pwsacademy.
Ray Fix is the final pass editor of this book. He works on next-generation microscopes made for iPad at Discover Echo Inc. Ray enjoys speaking Japanese, walking, jogging and playing ultimate frisbee. When he is not doing one of those things, he writes and dreams of code in Swift.
About the Artist
Vicki Wenderlich is the designer and artist of the cover of this book. She is Rays wife and business partner. She is a digital artist who creates illustrations, game art and a lot of other art or design work for the tutorials and books on raywenderlich.com. When shes not making art, she loves hiking, a good glass of wine and attempting to create the perfect cheese plate.
Book license
By purchasing Swift Apprentice, you have the following license:
You are allowed to use and/or modify the source code in Swift Apprentice in as many apps as you want, with no attribution required.
You are allowed to use and/or modify all art, images and designs that are included in Swift Apprentice in as many apps as you want, but must include this attribution line somewhere inside your app: Artwork/images/designs: from Swift Apprentice, available at www.raywenderlich.com.
The source code included in Swift Apprentice is for your personal use only. You are NOT allowed to distribute or sell the source code in Swift Apprentice without prior authorization.
This book is for your personal use only. You are NOT allowed to sell this book without prior authorization, or distribute it to friends, coworkers or students; they would need to purchase their own copies.
All materials provided with this book are provided on an as is basis, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
Next page