Chapter 9. Application Preferences

WHAT YOU WILL LEARN IN THIS CHAPTER

  • How to add application preferences to your application

  • How to programmatically access the Settings values

  • How to reset your application's preferences settings

If you are a relatively seasoned Mac OS X user, you're likely familiar with the concept of application preferences. Almost every Mac OS X application has application-specific settings that are used for configuring the application's appearance and behavior. These settings are known as the application preferences.

In the iPhone OS, applications also have application preferences. In contrast to Mac OS X applications, however, whose application preferences are an integral part of the application, iPhone preferences are centrally managed by an application called Settings (see Figure 9-1).

Figure 9-1

Figure 9.1. Figure 9-1

The Settings application displays the preferences of system applications as well as third-party applications. Tapping any setting displays the details, where you can configure the preferences of an application.

In this chapter, you learn how to incorporate application preferences into your application and modify them programmatically during runtime.

Creating Application Preferences

Creating application preferences for your iPhone application is a relatively straightforward process. It involves adding a resource called the Settings Bundle to your project, configuring ...

Get Beginning iOS 4 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.