Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Swift iOS Programming for Kids
  • Toc
  • feedback
Swift iOS Programming for Kids

Swift iOS Programming for Kids

By : D. Sommer, Campagno
4.2 (5)
close
Swift iOS Programming for Kids

Swift iOS Programming for Kids

4.2 (5)
By: D. Sommer, Campagno

Overview of this book

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.
Table of Contents (15 chapters)
close
2
2. Getting Set Up
10
10. Pokémon Battle
chevron up
13
13. Space Pizza Delivery

Pokémon type

When creating a program, there are times when you will want the instances of your various types to interact, in ways that allow them to communicate with each other (as in the real world). What does that mean exactly? Let's break it down.

To say we have an instance of a type means that we have an actual thing that can perform actions and respond to methods. It also has properties or attributes (hair color, eye color, and many more).

Let's start with a simple example and build on it as we progress through the chapter. Here's an example of a Pokemon class:

class Pokemon {
    let name: String
    init(name: String) {
        self.name = name
    }
}

Tip

All related source code for this chapter can be found here: https://github.com/swift-book-projects/swift-3-programming-for-kids/tree/master/Chapter-10

We've created a class called Pokemon. This means that we've created a brand new type that can...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete