Anyone Can Create an App
Beginning iPhone and iPad programming
Wendy L. Wise
  • March 2017
  • ISBN 9781617292651
  • 336 pages
  • printed in black & white
ePub + Kindle available Mar 31, 2017

An excellent way to get started on iOS development. A beginner-friendly approach that lets you learn at your own pace.

Stephen Byrne, Dell

Do you have a fantastic idea for an iPhone app but no idea how to bring it to life? Great news! With the right tools and a little practice, anyone can create an app. This book will get you started, even if you've never written a line of computer code.

Table of Contents detailed table of contents

Part 1 Your Very First App

1. Getting started

1.1. The big picture – iPhone and iPad development

1.1.1. Some key terms

1.1.2. Am I developing or programming?

1.1.3. Objectively Swift

1.1.4. Apps you’ll create

1.2. Learning what you need to remember

1.2.1. Understanding Key Concepts

1.2.2. Syntax

1.2.3. The importance of Pseudocode

1.3. What you need to create apps for iPhones and iPads

1.3.1. You're going to need a Mac

1.3.2. Xcode: the iPhone and iPad development environment

1.3.3. Helpful Resources

1.4. Summary

2. Building your first app

2.1. Launching Xcode for the first time

2.1.1. Step 1: Launch Xcode

2.1.2. Step 2: Create new project

2.1.3. Step 3: Set up your project options

2.1.4. Step 4: Run the blank app

2.1.5. Step 5: Add the Hello World text

2.1.6. Step 6: Run the app

2.1.7. Step 7: Pat yourself on the back (and review)

2.2. Summary

3. Your first app explained

3.1. Xcode Templates – Explained

3.2. Understanding the Single View Application

3.3. A label defined

3.4. The simulator defined

3.4.1. Running Hello World in the Simulator

3.5. Summary

4. Learning more about your development tools: Xcode

4.1. Xcode panels explained

4.1.1. Standard Editor

4.1.2. Utilities panel

4.1.3. Main.storyboard

4.1.4. Navigator panel

4.2. Xcode icons explained

4.3. Feel free to explore

4.4. Summary

5. Capturing users' actions: adding buttons

5.1. Adding a label and a button

5.1.1. Step 1: Start a new project using the Single View Application template

5.1.2. Step 2: Add a button and label to the storyboard, and run the app to test it

5.1.3. Step 3: Connect the button and the label to the code (wire them up), and run the app to test it

5.1.4. Step 4: Add code to change the text on the Label when the button is clicked, and run the app to test it

5.2. Changing how the label appears

5.2.1. Step 5: Change how the label looks, and run the app to test it

5.3. Summary

6. The button app explained

6.1. The button explained

6.1.1. Creating outlets – or – how do I contact Butch?

6.1.2. Creating actions

6.1.3. Is Xcode clairvoyant?

6.1.4. User Interfaces and the front end of apps

6.2. Documentation

6.3. Commenting: You can never be too wordy, can you?

6.3.1. Comments really are your friend

6.3.2. How to comment your code

6.4. Summary

7. Capturing user input: adding text boxes

7.1. Adding text fields

7.1.1. Step 1: Create a new single-view application

7.1.2. Step 2: Add a button and a label to the view

7.1.3. Step 3: Add a text field to the view

7.1.4. Step 4: Connect the button, label, and text box to the code (wire them up), and test the app

7.1.5. Step 5: Add code to change the label, and test the app

7.1.6. Step 6: Comment the code

7.2. Summary

8. Playing on the Playground

8.1. Swift Playgrounds – learning to interact with others

8.2. Frameworks

8.3. Types of Variables

8.3.1. Not your shoestrings

8.3.2. Going back to math class

8.3.3. Double, double, toil and trouble

8.4. Summary

Part 2 The keys to the city: understanding key development concepts

9. Go with the flow, man! Controlling the flow of your app

9.1. Control your flow

9.2. If you do that again, I'm going to…

9.3. If you do that or if you…then I'm going to…

9.4. If you do that AND you do this, I will…

9.5. If you do this, else if you do this, else if you do this…

9.5.1. Printing a line with values of variables and strings

9.6. If you do that, otherwise..

9.7. Summary

10. While You're Doing That…

10.1. Using the while statement to control your code

10.1.1. The While statement in action

10.1.2. Wrapping up the while statement discussion

10.2. Turn around now switch (Remember Will Smith?)

10.2.1. Assignment

10.3. How many fingers am I holding up?

10.3.1. Step 1: Add all the Components to the storyboard

10.3.2. Step 2: Make the storyboard connections

10.3.3. Step 3: Create a variable to capture the number guessed: numberGuessed

10.3.4. Step 4: Change the numberGuess variable when the stepper is tapped

10.3.5. Connecting the Guess button

10.4. Summary

11. Collections

11.1. Quantum Arrays: Not really, but that sounds scary, right?

11.2. The for statement and loop

11.3. Dictionaries

11.4. Creating a state name lookup app

11.4.1. Step 1: Create an app named StateAbbreviationLookup

11.4.2. Step 2: Add the UI components to the storyboard

11.4.3. Step 3: Connect the UI components to the code

11.4.4. Step 4: Create the dictionary of state abbreviations and names

11.4.5. Step 5: Create the code to look up the state abbreviation when the user types in the state name

11.5. Summary

12. Telling Stories with Storyboards

12.1. Storyboards

12.2. Step 1 : Create a new app called StoryboardExample

12.2.1. Step 2: Add a second scene to the app

12.2.2. Step 3: Add a navigation bar to the second scene

12.2.3. Step 4: the Cancel button to the first scene

12.3. Segue Animation Types

12.4. Summary

13. ViewControllers in Depth

13.1. Inheritance

13.2. The Override keyword

13.3. View Controller Lifecycles

13.4. The Lifecyle App

13.4.1. Step 1: Create a new project called Lifecycle

13.4.2. Step 2: Add a second ViewController

13.4.3. Step 3: Create an unwind segue

13.4.4. Steo 4: Override the 5 functions

13.4.5. Step 5: Test the app

13.5. Summary

14. Put in on my tab – creating tab bars

14.1. The Tab Bar Controller

14.1.1. Step 1: Create a new app

14.1.2. Step 2: Delete the existing Scene

14.1.3. Step 3: Add a Tab Bar Controller to the Storyboard

14.1.4. Step 4: Add labels to the different tabs

14.1.5. Step 5: Add a third tab to the app

14.2. Summary

15. Table Views: More than a coffee table picture book

15.1. Delegation

15.1.1. Making pizza from scratch

15.1.2. Delegating pizza making

15.2. Protocols

15.3. Data sources

15.4. Creating a table view app

15.4.1. Step 1: Create the app

15.4.2. Step 2: Add a table view to the ViewController

15.4.3. Step 3: Set up the prototype cell

15.4.4. Step 4: Set the UITableView Protocols

15.4.5. Step 5: Create the data source for Pizza

15.4.6. Step 6: Connect the data to table

15.5. Summary

16. Patterns: Learning to Sew

16.1. Design Patterns, defined

16.1.1. Clean code

16.1.2. Understandable

16.1.3. Maintainable

16.1.4. Extensibility

16.2. Types of Design Patterns

16.2.1. Model-View-Controller Design Pattern

16.2.2. Delegate Pattern

16.2.3. The Momento Pattern

16.3. Summary

Part 3 Creating the Like it or Not App

17. Putting it all together: The LioN app

17.1. Like it or Not

17.2. Getting started

17.2.1. Creating the app

17.2.2. Adding a Navigation Controller

17.2.3. Adding an iPhone 4S simulator

17.2.4. Connecting the data to the table view

17.2.5. Implement the functions for table views

17.3. Summary

18. Adding Data to Your LioN

18.1. Adding Hard Coded Data to Your LioN

18.1.1. Creating an array of dummy data

18.1.2. Wiring lionData to the tableView with hardcoded data

18.2. Adding a model to the mix

18.2.1. Adding a new Swift file to the project

18.3. Changing the layout of the table cell

18.3.1. Changing the cell in the storyboard to show the description

18.3.2. Updating the function to show the description

18.4. Summary

19. Displaying Details of Your LioN

19.1. Capture the tapped row index

19.2. Add a detail page to the Storyboard

19.2.1. Add a View Controller to the Storyboard

19.2.2. Create a new ViewController Class

19.3. Passing data to the DetailViewController

19.3.1. Prepare the DetailViewController to accept the Lion

19.3.2. Update the MainViewController to pass data

19.4. Summary

20. Creating the details of the detail view

20.1. Adding some labels to our Detail screen

20.1.1. Converting an Int to a string using the description

20.1.2. Converting an Int to a string using String

20.2. Adding new Lions to the list

20.2.1. Add the + button to the view

20.2.3. Adding hardcoded values to the LioN list

20.2.4. Deleting Lions from the list

20.3. Summary

21. The AddEditView Scene

21.1. Creating a new detail view

21.1.1. Adding a new Table ViewController

21.1.2. Add a new AddEditViewController Class

21.1.3. Hooking up the Cancel and Done buttons

21.1.4. Checkpoint

21.2. Adding new Lions

21.2.1. Don't allow the cell to be selected

21.2.2. Setting the keyboard behaviors

21.2.3. Dismissing the keyboard on user tap

21.3. Summary

22. Delegates are everywhere

22.1. Connecting Our Views

22.1.1. Implementing the protocol

22.1.2. Updating our cancel and done actions

22.1.3. Capturing the user input

22.2. MainViewController conformance

22.3. Adding the lion object to the lion array

22.3.1. Changing the done button properties

22.4. Setting the like and dislike property

22.5. Summary

23. Editing LioNs

23.1. Editing existing Lions

23.1.1. Setting up the AddEditViewController to accept a Lion object to edit

23.1.2. Filling in the text boxes with the LioN name and description

23.1.3. Showing whether the LioN is liked or disliked

23.1.4. Passing the Lion object to the Add/Edit controller

23.1.5. Saving the Lion when the user hits done, but not create a new Lion

23.2. Summary

24. Saving LioNs

24.1. Playing in the sandbox

24.2. Saving your data

24.2.1. Changing the class definition for the Lion object

24.2.2. Encoding the data for saving

24.2.3. Decoding the data for loading

24.2.4. Adding the loadLions function

24.2.5. Loading summary

24.2.6. Adding Save Functionality

24.3. Testing the load and save functionality

24.4. Summary

25. Make your LioN prettier

25.1. Basic fixes

25.1.1. Creating two sections

25.1.2. Adding the like and dislike images

25.1.3. Changing the table view background colors

25.1.4. Toggling the images based on selection

25.1.5. Setting Images on the Cells

25.1.6. Making the MainView scene prettier

25.1.7. Updating the navigation bars

25.2. Adding an Icon

25.3. Update the Launch Scene

25.4. Summary

26. Working with Auto Layout

26.1. Changing the Layout to Work for All Screen Sizes

26.1.1. Make Changes to the AddEditView Scene

26.1.2. Change the Layout for Cells on the Main Scene

26.2. Summary

27. Search Your LioNs

27.1. Adding the Search Functionality

27.2. Filtering the LioNs based on user input

27.2.1. Creating the filter function

27.2.2. Filtering the array using a closure

27.2.3. Changing the table view data source

27.2.4. Polishing the app

27.3. Searching Other Fields

27.4. Summary

27.5. Where do you go from here?


Appendix A: Installing Xcode and Apple developer registration

A.1. Downloading Xcode

A.2. Apple requirements for iPhone and iPad development

Appendix B: Running Your App on Your Device

About the book

Anyone Can Create an App begins with the basics by introducing programming concepts, the Swift language, and the tools you'll need to write iOS apps. As you explore the interesting examples, illuminating illustrations, and crystal-clear step-by-step instructions, you'll learn to:

  • Get started programming, no experience necessary!
  • Add controls like text boxes and buttons
  • Keep track of your favorite things by creating the Like It or Not (LioN) app
By the end, you'll be able to create and run your own apps, and you'll have the confidence to learn more on your own. The book is updated for Swift 3.

About the reader

This book is written especially for non programmers - no experience needed!

About the author

Wendy Wise has an extensive background in mobile and application development and has worked with several Fortune 500 companies. In her 17-year technical career, Wendy has served as a senior director of software development, a senior product manager for international mobile applications, and a hands-on developer for web and mobile technologies, among many other technical roles. Wendy fully embraces her nerd/geek side, as you'll find out as you read this book. In her spare time, she enjoys beer, coffee, photography, camping, and being outdoors.

combo $29.99 pBook + eBook
eBook $23.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

A clear, concise guide for the uninitiated. Quick results guaranteed in simple steps!

Mark Cooper, Cooper and Lansbury Associates

Highly recommended for anyone wanting to get their first app into the App Store.

Jason Pike, Atlas RFID Solutions

Approachable, easy to read, and easy to follow.

Jocelyn Jeriah, MBO Partners