Copyright by Tracey Pilone, Dan Pilone

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 6. saving, editing, and sorting data: Everyone's an editor...

If these records were on an iPhone and I could edit them life would be grand!

Displaying data is nice, but adding and editing information is what makes an app really hum. DrinkMixer is great—it uses some cell customization, and works with plist dictionaries to display data. It's a handy reference application, and you've got a good start on adding new drinks. Now, it's time to give the user the ability to modify the data—saving, editing, and sorting—to make it more useful for everyone. In this chapter we'll take a look at editing patterns in iPhone apps and how to guide users with the nav controller.

Sam is ready to add a Red-Headed School Girl...

Sam went to try DrinkMixer with the new add view, and ran into problems right away.

A new drink at the Lounge.

Sam was clicking around, ready to add his new drink.

The directions field is hidden under the keyboard.

You can't see the directions at all, and part of the ingredients information is covered up.

Sam, the bartender

We have a problem with our view, since we can't get to some of the fields.

...but the keyboard is in the way

We're back to the keyboard problem we saw earlier with InstaTwit. When Sam taps on a control, it gets focus (becomes the first responder) and asks iPhoneOS to show the keyboard. Generally, that's a good thing. However...

When Sam taps in the Drink name field, the keyboard appears like it's supposed to—that's good.

We had a similar problem in InstTwit where ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required