O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

Storing the Settings

In the settings part of the app, the user is able to change the sort order of the displayed contacts. The contacts can be sorted in either ascending or descending order by Name, City, or Birthday (Figure 11.11). Although the user interface for this screen might more logically be set up using Segmented Controls, you will get a chance to work with two new controls, the Picker View and the Switch. The user’s preference for sorting will be stored in a NSUserDefaults object. The data will be stored in the Settings screen and read in the Contacts section of the app.

Image

Figure 11.11 The completed Settings interface.

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