iOS 4

The iPhone and iPad provide an unforgettable user experience. It’s one of the rare technologies that’s so intuitive that even a toddler can use it without a user manual. iOS provides a whole platform for developers. It comes with a huge global market and one integrated distribution place: the App Store. The iOS SDK offers […]

Understanding iPhone and iPad touch interaction (iOS 4)

The iPhone and iPad use a multitouch-capable capacitive touchscreen. Users access the device by tapping around with their finger. But a finger isn’t a mouse. Generally, a finger is larger and less accurate than a more traditional pointing device. This disallows certain traditional types of UI that depend on precise selection. For example, the iPhone […]

Getting ready for the SDK (iOS 4)

The iOS software development kit (SDK) is a suite of programs available in one gargantuan (at the time of writing over 4 GB) download from Apple. It gives you the tools you need to program (Xcode—Xcode 4 is the version of the iDE used in this topic), debug (Instruments), and test (Simulator) your iPhone, iPod […]

Introducing iOS

Apple’s iOS SDK provides you with a vast library of objects arranged into several frameworks. As a result, you’ll spend a lot more time sending messages to objects that are ready-made for your use than creating new ones. Let’s begin our look at iOS by exploring several of these objects and how they’re arranged. We’ll […]

iOS’s methods

As you’ve seen, iOS has a complex and deep structure of classes. In this section, we look at object creation, memory management, event response, and lifecycle management. Two of the most important classes are NSObject and UIResponder, which contain many of the methods and properties you’ll use throughout your programming. Thanks to inheritance, these important […]

How to make an application from an idea (iOS 4)

At the beginning of this topic we talked about turning great idea in to a killer application. How do you do it? Let’s walk through the general steps to help make your dreams come true. The checklist There are several ways to build a universal application running on both the iPhone and iPad. Let’s start […]

Introducing Objective-C (iOS 4)

In this topic, we’ll examine all of the Objective-C elements that are applicable to iOS development. We assume that you have a good understanding of a rigorous programming language (like C), that you know the basic concepts behind object-oriented programming (OOP), and that you understand what the Model-View-Controller (MVC) architectural model is. We’re now ready […]

The message (iOS 4)

Objective-C’s most important extension to the C programming language is the message. A message is sent when one object asks another to perform a specific action; it’s Objective-C’s equivalent to the procedural functional call. Messages are also where Objective-C’s syntax varies the most from ANSI C standards—which means that when you understand them, you’ll be […]

Class definition (iOS 4)

As we’ve noted, each class tends to be represented by a matched pair of files: a header file and a source code file. To define a class, each of these files must contain a special compiler directive, which is always marked in Objective-C with an @ symbol. First, you define the interface for the class, […]

Properties (iOS 4)

What we’ve covered so far should be sufficient for you to understand (and write) most simple Objective-C code. One other major feature in Objective-C deserves some extended discussion because of its unique syntax: the property. The purpose of properties Because instance variables are encapsulated, you usually have to write tons of getter and setter methods […]