Learn Swift by Building Applications
Explore Swift programming through iOS app development
Emil Atanasov
BIRMINGHAM - MUMBAI
Learn Swift by Building Applications
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Ashwin Nair
Acquisition Editor: Reshma Raman
Content Development Editor: Nikhil Borkar
Technical Editor: Madhunikita Sunil Chindarkar
Copy Editor: Safis Editing
Project Coordinator: Ulhas Kambali
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Graphics: Tania Dutta
Production Coordinator: Arvindkumar Gupta, Nilesh Mohite
First published: May 2018
Production reference: 1230518
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-392-0
www.packtpub.com
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Emil Atanasov is an IT consultant who has extensive experience with mobile technologies. He started working in the field of mobile development in 2006. He runs his own contracting and consulting company, serving clients from around the worldAppose Studio Inc. He is an MSc graduate from RWTH Aachen University, Germany, and Sofia University "St. Kliment Ohridski", Bulgaria. He has been a contractor for several large companies in the US and UK, serving variously as team leader, project manager, iOS developer, and Android developer.
I want to thank my wife Elena, my family, and my friends for being very supportive, really patient, and super cool. Thank you for keeping me motivated through the endless work days. I know that in your eyes I'm a bizarre geeky person, who is spending most of the time in the digital world. I appreciate your understanding.
About the reviewer
Giordano Scalzo is a developer with 20 years of programming experience, since the days of ZXSpectrum. He has worked in C++, Java, .Net, Ruby, Python, and in a ton of other languages that he has forgotten the names of. After years of backend development, over the past 5 years, Giordano has developed extensively for iOS, releasing more than 20 appsapps that he wrote for clients, enterprise application, or on his own. Currently, he is a contractor in London where, he delivers code for iOS through his company, Effective Code Ltd, aiming at quality and reliability.
Id like to thank my better half, Valentina, who lovingly supports me in everything I do: without you, none of this would have been possible.
Thanks to my bright future, Mattia and Luca, for giving me lots of smiles and hugs when I needed them.
Finally, my gratitude goes to my mum and dad, who gave me curiosity and the support to follow my passions, which began one day when they bought me a ZXSpectrum.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
Preface
Learning Swift 4 by Building Applications is a book that teaches the basics of Swift in the context of iOS. If you finish the book, you should be able to develop small-to-medium mobile apps. You will know how to create the app UI in storyboard using Xcode, how to load and display images fetched from the cloud, how to save and load information between different sessions of the app, and how to share data between all users of the app using the cloud.
Who this book is for
The book is designed for beginners who have little or no experience with Swift or any other programming language. The first couple of chapters introduce the Swift and the core programming principals, which are used throughout the process of software development. The rest of the book discusses the Swift development of iOS mobile applications. We will explain how to use open source libraries to achieve rapid software development and develop apps that are consuming information and images from the c l oud.
What this book covers
, Swift Basics Variables and Functions , discusses the basics of the Swift language, starting from the A, B, and C.
, Getting Familiar with Xcode and Playgrounds , presents the Xcodea free IDE that we will use when developing Swift. We shouldn't forget that Xcode is developed by Apple and that the playgrounds are the perfect place for learning Swift step by step.
, Creating a Minimal Mobile App , makes you examine the minimal mobile app and its structure. This is the basis of every iOS mobile app written in Swift.
, Structures, Classes, and Inheritance
Next page