Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Swift iOS Programming for Kids
Swift iOS Programming for Kids

Swift iOS Programming for Kids: Help your kids build simple and engaging applications with Swift 3.0

By Steffen D. Sommer , Jim Campagno
AU$42.99
Book Mar 2017 260 pages 1st Edition
eBook
AU$42.99
Print
AU$53.99
Subscription
$19.99 Monthly
eBook
AU$42.99
Print
AU$53.99
Subscription
$19.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now
Table of content icon View table of contents Preview book icon Preview Book

Swift iOS Programming for Kids

Chapter 1.  What is Programming?

We use programming to instruct a computer. Computers include smartphones (such as the iPhone), tablets, game consoles (such as the PlayStation), and a lot more. We say that a computer runs a program, which means that when you open your favorite game or application (also referred to as an app) on your PlayStation or on your iPhone, the device will know how to interpret and execute the program, which in this case is your game or application. A program is simply a set of instructions that your device is able to understand. We can also consider these instructions as a recipe for the device. The recipe will tell your iPhone what your favorite game is all about-everything from the colors of your avatar, to the text in the menus, to what happens when you tap on an enemy or on an animal in a game. This recipe can be written in many ways depending on your personal preference and the device that is supposed to run it. The programming language refers to the language you choose to write your program in. 

This chapter will go through the following topics:

  • Introducing the Swift programming language

  • Why is programming important?

  • What the reader can expect from this book

The Swift programming language


Swift is a programming language introduced by Apple, which you can use to create apps for the most common Apple devices, including the iPhone. The language and device you choose defines the possibilities for your program, for example, using Swift and targeting an iPhone as your device, you will be able to access the camera of the iPhone to take photos in your application, or the speaker of the iPhone in order to play sounds in your application. If you choose JavaScript as your programming language, HTML as your markup language and target the browser on your computer as your device, then you will be able to create interactive web pages. A programming language can differ much from language to language, and although the languages can share common concepts, it does not mean that one will master every programming language just by learning one. This leads to what programming is: it is the act of creating a program or recipe for your device to run. What is the result? The result is your program, your application, or your game.

Let's imagine this simple application for an iPhone-Movie Night, which has a list of your favorite movies. If the list is longer than the height of your device, you are able to scroll through the list by swiping up and down. You can add movies to your list by tapping a button and entering a name for the movie and you can delete them again by swiping left on the movie in the list. The idea of the app is to keep a list of your favorite movies so that you can remember them when having a movie night. In this case, the program is the application (called Movie Night), the device is the iPhone, and the instructions of the application could be the colors of the background and texts, the list in which you can scroll, and the add and delete functionalities. Programming is about creating these set of instructions so that we are able run our application on our iPhone. If you're excited about creating your own Movie Night app that you can use with your friends, then read along as this is an application we will build together in Chapter 14, Movie Night - iOS App.

Why is programming important?


There are many reasons for why programming is becoming increasingly popular. The result of doing programming allows people to connect through social media, such as Facebook and Instagram; it allows people to be entertained through immersive and rich games; and it allows people to learn and become educated in a fun and engaging manner using interactive applications. Programming has enabled us to share knowledge across geographical boundaries in a way that seemed impossible before programming existed. Programming has helped us automate tasks such as selling tickets at the local train station, paying in a faster and secure way using our smartphone, and programming has helped us measure the well-being of humans in order to give the right treatment at the right moment.

Programming has made it possible for us to instruct a computer on how to perform certain tasks in a more efficient and reliable manner than would ever be possible for a human being. There are natural limits to how much a person can do within the 24 hours of a day or within the lifetime of a person's life. Also, it is costly to have a person perform tedious tasks that seem repetitive, time-consuming, or based on deterministic behavior, such as calculations. As it is costly and it can be hard to find the right or, simply, enough people, it also means that it does not scale very well. Computers are relatively cheap and can be considered as fairly stable. If computers break, they are easy to replace, which means that performing tasks using computers scales really well. Just imagine a bank system without computers; imagine people sitting and keeping track of each person's balance and trying to keep it synchronized across large geographical distances.

Imagine the recent Pokémon smartphone game being done without computers. With no computers, there would need to be maps distributed to each player that show exactly where a Pokémon is located and people (from the game) would need to be at the actual geographical location in order to tell or validate that the Pokémon trainer had just found a Pokémon. Also, in order to keep track of Pokémon caught, and not to mention the outcome of a battle with another trainer, a lot needs to be handled on paper by the player. Without computers, one can easily think of problems with consistent play experiences, such as verifying that a player does not cheat and modifying the game rules as the game evolves, just to name a few. In general, computers have the ability to enhance our daily life, and we quickly forget what the world would look like without computers. Traditionally, programming has had a steep learning curve and, in general, been inaccessible by younger people. Today, programming is widely used and we have many different languages and tools that solve a lot of different types of problems. This means that it has been possible to lower the learning curve and involve people of different ages and with different capabilities.

What you will learn from this book


This book gives you an introduction to the programming language, Swift. Swift is a fairly new programming language (version 1 came out in September 2014) and the language can be used to write programs for most of the Apple devices, including the iPhone, iPad, Apple Watch, MacBook, and Apple TV. Throughout the book, we will gradually introduce you to more and more programming concepts until we have enough knowledge to start creating our own programs. The book will let you create programs such as a small Pokémon game, where Pokémon will be able to battle each other.

We will also be creating an app to deliver pizzas in outer space and the aforementioned Movie Night app to keep a list of your favorite movies. After creating our programs, you will be able to install the applications on an iPhone and show it to your friends. After being introduced to Swift and the knowledge and tools required to create an application for the iPhone, you should be able to continue to explore this area of programming. You should not only be able to continue working on the applications we create throughout this book, but also be capable of continuing the learning journey using other books or Internet resources. By using the skills provided in this book along with some imagination, a lot of fun and useful applications can be created for iOS devices such as the iPhone.

Summary


In this chapter, we looked at what programming actually is, why it is useful, and examples of what we use programming for. We discussed what a world without programming would look like and we looked at a short introduction to the Swift programming language. Lastly, we introduced what the reader can expect to learn when reading this book and how this can be used moving further into the world of programming.

In the next chapter, we will go over the practical part of getting the user set up with the right tools in order to begin programming.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • - Children can express their creativity while learning through interactive Swift Playgrounds
  • - Empower children to think critically about problems
  • - Learning programming basics can help children gain confidence in problem solving
  • - Help children put their imagination into action building their first iOS app

Description

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.

What you will learn

- Basic programming and coding fundamentals - Write code using the fun and interactive Swift Playgrounds app - Make animations, including creating your own starry night - Utilise functions by making pizza in code - Create an interactive toy bin - Learn how to use control flow statements to further enhance your toy bin - Build a simple movie night app working with tableviews and arrays

Product Details

Country selected

Publication date : Mar 22, 2017
Length 260 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781787120747
Vendor :
Apple
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Mar 22, 2017
Length 260 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781787120747
Vendor :
Apple
Category :
Languages :

Table of Contents

21 Chapters
Swift iOS Programming for Kids Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Authors Chevron down icon Chevron up icon
About the Reviewer Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Customer Feedback Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
1. What is Programming? Chevron down icon Chevron up icon
2. Getting Set Up Chevron down icon Chevron up icon
3. Say Hello Chevron down icon Chevron up icon
4. Favorite Things Chevron down icon Chevron up icon
5. Factories Chevron down icon Chevron up icon
6. Making Pizza Chevron down icon Chevron up icon
7. Toy Bin Chevron down icon Chevron up icon
8. Smarter Toy Bin Chevron down icon Chevron up icon
9. Making Some Friends Chevron down icon Chevron up icon
10. Pokémon Battle Chevron down icon Chevron up icon
11. Simon Says Chevron down icon Chevron up icon
12. Starry Night Chevron down icon Chevron up icon
13. Space Pizza Delivery Chevron down icon Chevron up icon
14. Movie Night - iOS App Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Top Reviews
No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.