O'Reilly logo

iPhone® Application Development For Dummies®, 2nd Edition by Neal Goldstein

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 8. Entering and Managing Data

In This Chapter

  • Going with the flow in an iPhone application

  • Working with notifications

  • Using dictionaries

  • Understanding view geometry

  • Scrolling views

  • Dismissing the keyboard

  • Becoming a delegate

  • Adopting protocols

  • Navigating your code

Things aren't perfect with our ReturnMeTo application yet. The iPhone on the left in Figure 8-1 shows what happens when you select the text field to enter a phone number.

Not very useful, is it? Reminds me of the time I sat behind Yao Ming in the movie theater. (Can you say, "Down in front!"?)

The iPhone on the right in Figure 8-1 does it the way it should be — as in, the view moves down so you can see what you're typing.

Okay, maybe the movie-theater metaphor isn't that appropriate (I was kidding about famous basketball players anyway). It's not that the keyboard ducks down so you can better see the content view; rather, the idea is to scroll the content view up when the keyboard appears so you can see the phone number you're entering as you continue to develop the application.

Incidentally, implementing this little scrolling business is probably the most complicated thing you'll be doing with this application. It involves a number of different objects and methods that are invoked over the life of the application.

Well, you do get a keyboard, but not much else.

Figure 8-1. Well, you do get a keyboard, but not much else.

I have an ulterior motive here: As I take you through implementing ...

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