O'Reilly logo

Beginning iOS Programming: Building and Deploying iOS Applications by Nick Harris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4Creating a User Input Form

WHAT YOU LEARN IN THIS CHAPTER:

  • Creating a model object and adding properties
  • Building an interactive user interface
  • Saving and retrieving data

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

You can find the wrox.com code downloads for this chapter at www.wrox.com/go/begiosprogramming on the Download Code tab. The code is in the chapter 04 download and individually named according to the names throughout the chapter.

In the last chapter you learned how to create a simple iOS application. Though some applications display only information, most require a way for the user to add and edit data. In this chapter, you continue building the Bands app by giving the user a way to add a band and save it.

If you have created desktop applications or web apps, you’re familiar with data input forms. You are also familiar with the objects or classes that represent this data within the code. Typically, you present the user with an interface including text fields, switches, and selectors they can use to enter and manipulate the data objects. iOS applications are no different. In Visual Studio you add user interface objects to a dialog or window and then double-click them to associate methods that handle events as the user manipulates the data. Xcode handles this a bit differently, although the concepts are the same.

The first step is adding the model object, which represents a band.

INTRODUCING THE BAND MODEL OBJECT

As discussed in Chapter 2, “Introduction to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required