iOS 4

Debugger and Instruments (iOS 4)

Now that we’ve covered some of the fundamental features in Xcode, let’s talk about an important part of writing an application: debugging. Although you may have some reservations about the debugging process as a developer, it’s critical to discover and remove bugs in the product development lifecycle. Xcode provides a handy tool for debugging: Debugger. […]

The view controller family (iOS 4)

So far in the last two topics we haven’t strayed far from the most fundamental building block of the SDK: the view, whether a UILabel, a UIWebView, or a Ullmage-View. Ultimately, the view is only part of the story. As we mentioned when we looked at iOS, views are usually connected to view controllers, which […]

The standard view controller (iOS 4)

The plain view controller is simple to embed inside your program. But why would you want to use a view controller? That’s going to be one of the topics we’ll cover here. Now, we’ll look at how view controllers fit into the view hierarchy, how you create them, how you expand them, and how you […]

The table view controller (iOS 4)

Like the plain view controller, the table view controller manages a single page. Unlike the plain view controller, it does so in a structured manner. It automatically organizes the data in a nicely formatted table. Our discussion of the table view controller will be similar to the discussion we just completed of the bare view […]

An introduction to events (iOS 4)

In the previous topic, you learned how to create the basic view controllers that fulfill the controller role of an MVC architectural model. You’re now ready to start accepting user input, because you can send users to the correct object. Users can interact with your program in two ways: by using the low-level event model […]

A touching example: the event reporter (iOS 4)

The sample application for events is an event reporter, which offers a variety of responses depending on how and when the device screen is touched. The sample program has two goals. First, we want to show you a cool and simple application that you can write using events—one that should get you thinking about everything […]

Other event functionality (iOS 4)

Before we complete our discussion of events, we’d like to cover a few more topics of interest. We’ll explore how to regulate the report of events in a variety of ways and then describe some deficiencies in the event model. Regulating events As we mentioned earlier, there are some ways that you can modify how […]

An introduction to actions (iOS 4)

If you won’t usually be programming directly with events, how will you access user input? The answer is by using actions. You’ll typically depend on preexisting text views, buttons, and other widgets to run your programs. When using these objects, you don’t have to worry about raw events. Instead, you can build programs around control […]

Adding a button to an application (iOS 4)

The simplest use of an action is probably adding a button to an application and then responding to the press of that button. As you’ll see, this turns out to be a lot easier than digging through individual touches. We’ve opted to show you how to work with a button in two ways: first by […]

Other action functionality (iOS 4)

In this section we’ll look at two controls that report back different signals than the simple button-up or button-down control events. The first is the UITextField, the prime control for entering text, and the second is the relatively simple (but unique) UISlider. In the process, we’ll also explore the other text-based entry formats, because they […]