Coding iPhone Apps for Kids: A Playful Introduction to Swift

Coding iPhone Apps for Kids: A Playful Introduction to Swift — page 5
Learning a programming language will give you skills in problem solv ing communication and creativity For these reasons and many more programming is a highly useful skill to have Even if you don’t intend to become a professional programmer if you regularly use a computer or a mobile device then learning to program can improve your life Who Should read This Book If you’re interested in learning how to program this book is a great place to start Coding iPhone Apps for Kids is targeted toward kids but it is also a good resource for adults who are new to programming You should find this book useful whether you have no programming experience or are an expe rienced programmer who wants to learn how to develop apps If you’re new to programming we recommend that you start at the beginning and then work your way forward chapter by chapter through Part 1 Xcode and Swift These chapters teach you basic programming skills that will build upon each other As you read test out the examples and try writing your own code If you have some experience programming in another language we recommend starting with Chapter 1 which shows you how to download and install Xcode and then walks you through creating a simple Hello world app You may feel comfortable skimming through Chapters 2 to 4 and 6 to 8 but don’t skip Chapter 5 It covers optionals which are an important programming feature that is unique to Swift What’s in This Book Chapter 1 covers installing Xcode on your computer and includes a simple tutorial to make a Hello world app that you can run on your iPhone iPad or iPod touch Chapter 2 delves into programming in an Xcode playground environ ment and shows you how to create variables and constants of different data types Chapters 3 and 4 teach you how to control the flow of a computer program Chapter 3 covers if statements and conditionals and Chapter 4 covers for-in and while loops Chapter 5 covers optionals which are variables or constants that can either have a value or no value Optionals are an important concept that’s unique to the Swift programming language so be sure to read this chapter carefully In Chapter 6 you’ll learn how to work with two Swift collection types arrays and dictionaries Chapter 7 covers writing functions which are blocks of code that can be called repeatedly to perform specific tasks In Chapter 8 you’ll learn how to make a custom class which is a blue print for creating objects that represent real-world items such as a back pack a car a cat or anything else that you can imagine xx Introduction