Skip to main content
main-content

Über dieses Buch

The iPhone is the hottest gadget of our generation, and much of its success has been fueled by the App Store, Apple’s online marketplace for iPhone applications. Over 1 billion apps were downloaded during the nine months following the launch of the App Store, ranging from the simplest games to the most complex business apps. Everyone has an idea for the next bestselling iPhone app—presumably, that’s why you’re reading this now! And with the popularity of the iPad, this demand will just continue to grow.

So how do you build an application for the iPhone and iPad? Don’t you need to spend years learning complicated programming languages? What about Objective-C and Cocoa touch ? The answer is that you don’t need to know any of those things! Anybody can start building simple apps for the iPhone and iPad, and this book will show you how.

This update of an Apress bestseller walks you through creating your first app, using plain English and practical examples using the iOS 5 software development platform and more. It cuts through the fog of jargon and misinformation that surrounds iPhone and iPad application development, and gives you simple, step-by-step instructions to get you started.

Teaches iPhone and iPad apps development in language anyone can understand Provides simple, step-by-step examples that make learning easy, using iOS 5 Offers videos that enable you to follow along with the author—it’s like your own private classroom

Inhaltsverzeichnis

Frontmatter

Chapter 1. Before We Get Started

Abstract
This introductory chapter will ensure that you have all of the required tools and accessories to proceed fully and confidently through this book. Some of you may already have Xcode, an up-to-date iOS simulator, and Interface Builder installed on your Mac and you may believe that because you are solid on these points, you are ready to jump right in. If so, you may want to jump ahead to Chapter 2 and start immediately on your first program.
Rory Lewis

Chapter 2. Blast-Off!

Abstract
The first program we shall attempt, as mentioned in Chapter 1, will be a basic and generic “Hello World” application. This Blast-Off chapter emulates precisely what I have found, through experience, to work very well in the lecture halls when teaching this course. I use this simple, innocent, benign “Hello World App” as a basis to introduce students to the most critical skill sets that they will use over and over again. As happens with my own students, by the time you finish Chapter 2, you will know how to run your first app in 3 different ways, according to each of the following sections:
2.1.
iPhone Simulator.
 
2.2.
iPad Simulator reading your iPhone environment (pseudo iPad).
 
2.3.
iPad Simulator.
 
Rory Lewis

Chapter 3. Keep on Truckin’

Abstract
Now that you’ve gotten your feet wet from programming your first two iPhone and iPad apps, I want you to tell yourself that you have to keep on truckin’ with more apps, more practice, and create a more natural connection of synapses in your brain. Initially, many traditional Computer Science colleagues of mine had disdain for my approach of blindly hauling newbie programmers through code without explaining it all. Over the years, I’ve learned exactly when to tell you what’s going on and when to just jostle you through the code. Most importantly, you need to keep on truckin’ and keep your brain dialed into Xcode.
Rory Lewis

Chapter 4. Buttons & Labels with Multiple Graphics

Abstract
In this chapter, we’ll tackle our fourth program together, and it’s time to quicken the pace a bit. As in Chapter 3, you’ll be able to simply view the screen shots and implement the code if you remember most of the details—steps that have been described repeatedly in the previous examples. You’ll get fewer figures pertaining to each step, yet more procedures; we will be using the short bursts of information introduced in Chapter 3.
Rory Lewis

Chapter 5. Touches

Abstract
Here in our fifth app, we take a giant leap forward and really program some code. I want to say this right now: even though this is a big leap forward, there is always an easy ways out. Yes, I want you to do your very best to type in the all the code as you diligently follow the steps. Yes, I even want you to carry on when you feel like giving up; however, at this point, I want to clarify something with you, as I do with my students.
Rory Lewis

Chapter 6. Switches

Abstract
After finishing the touches app in Chapter 5, you can say that you’ve coded Objective-C apps without flinching! You are not alone if, while coding Chapter 5, you felt as though you were struggling to make your way across a tough and rocky road. I say this because all programmers have had to journey over this road. It’s absolutely OK to look back on that chapter and think to yourself that you don’t remember what you did. Yes, that’s normal, and I’m about to prove to you that it’s normal. First, I need to explain why you are going to take time out at this point.
Rory Lewis

Chapter 7. Storyboards

Abstract
This seventh chapter will introduce a new way to create an app quickly and visually. First, some views will be laid out and you will see how they can be connected without writing code, and you will get some neat transition animations for free. This new technique was first brought to the public’s attention when Apple announced that they would be introducing a new and never-before-seen feature called Storyboards, which would be built into Xcode. It would allow the easy layout of workflow apps that use navigation and tab bars to transition between views.
Rory Lewis

Chapter 8. Debugging

Abstract
As you begin the eighth chapter, you’ll start operating at a higher level. You may notice that in this chapter I use a different approach to teach you about debugging. In order for you to understand why this is an important chapter, I want you to consider the road that led me to presenting this chapter and its exercises.
Rory Lewis

Chapter 9. MapKit & Storyboarding

Abstract
I have been looking forward to writing this chapter on the MapKit framework and Storyboarding since I first conceived this book. This and the next two chapters will represent the culmination of our work together. Our journey is almost over and it is fitting that we finish with a bang. I am confident that integrating the MapKit framework, Storyboarding, TableViews, and iTunes will not disappoint you. This is not a trivial matter. Our journey over the last three chapters will be as follows: Chapter 9 will be Storyboarding and the MapKit framework. Chapter 10 will be Storyboarding, TableViews, and the MapKit framework. Finally, in Chapter 11, we will tackle Storyboarding and the iTunes stores (the place where you will place your apps). We will get more into Chapter 11 later, but suffice to say, I will show you how the most compelling apps incorporate Storyboarding, the MapKit framework, TableViews, and the Internet/iTunes store.
Rory Lewis

Chapter 10. MapKit & Tables with Storyboarding

Abstract
There are five things I want you to bear in mind regarding this chapter:
  • Continuation of Chapter 9: Chapter 10 takes what you learned in Chapter 9 and injects it with steroids. You will need to go over what you learned in Chapter 9 and go right into Chapter 10. In the lecture hall, I make my students in class run Chapter 9 in twenty minutes, that’s if they want a grade and then, immediately after emailing me a screenshot of their completed project, we go right into Chapter 10. May I suggest that, if you have taken a couple of days off after ending Chapter 9, that you too make yourself repeat Chapter 9 a couple of times until you can do it under twenty minutes. Even if you have to do it 15 times, do it over and over again before trying this chapter.
  • Non-trivial: When you’re done with Chapter 10, you will have really accomplished something you can be proud of. Yes, on one hand students shriek with laughter when we debate what level of geekdom a student will be at a certain point, but the truth is that after you’ve completed this app, you will be able to get work as an Objective-C programmer, or at least be able to hold a decent conversation with an interviewer who will not believe you classified yourself as an absolute beginner. Neither did Apple when they hired a student of mine to work in their iOS 5 development in Cupertino. Eight months earlier, she’d never owned a Mac and was studying the first edition of this book, so take this seriously; this chapter will be a defining chapter in your life.
  • Big Picture: As true as you are reading these words, there WILL be a time when this code will bog you down and, if you were in my lecture hall and I saw you overwhelmed and freaking out, I would walk up to you and remind you of the Big Picture. Throughout this chapter, I will bring you back to the Big Picture, which, in a nutshell, is a storyboard containing a table that is populated with many city names. We go to Google’s server and fetch the geospatial addresses of each of these cities and, when the user taps on one of the cities listed in your table, we travel along another segue that instantiates a MapKit that drops a pin in the center of that city.
  • Chapter Outline: Chapter 10 has very little preliminaries because I want you to seamlessly keep your momentum from Chapter 9 right into 10. I will explain where the help files and videos are, how to use them if you choose to, and how these are different from previous help files.
  • DO NOT GIVE UP: Chapter 10 tests you and I want you to break through. Listen to me when I say that nobody is going to do Chapter 10 in one try! You will have to start from scratch repeatedly. This issue of starting over is, in fact, the key: After spending a little time debugging, just start again from scratch. Please do not say to yourself: “Oh I can’t get this, look I’ve tried this 5 times and I can’t get through it!” It’s OK to fail and start again and I really want you to get through this. I want to see you go to the forum and tell everybody you got through Chapter 10! OK? Yeah!
Rory Lewis

Chapter 11. Storyboarding to Multimedia Platforms

Abstract
This is the last chapter of the book and I have been looking forward to writing this chapter for a long time. This is the capstone app if you will. The app that teaches you how to market your restaurant, business, or whatever you like to various multimedia platforms. I chose to promote a band for this app because it includes iTunes and many of my students struggle with iTunes. We will take care of that right here. In the lecture hall, I first walk through the app with the students as they imagine they are in a distant place and time and they’ve discovered a band called The Beatles. They then market that band on the Web, YouTube, and iTunes. In the second half of this project, the students create their own business that they market in a similar but much more creative manner.
Rory Lewis

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise