Accessing Your Preferences IPHONE APPS

iPhone applications get and set preferences values using either the Foundation and Core Foundation frameworks. In the Foundation framework, you use the NSUserDefaults class to get and set preference values. In the Core Foundation framework, you use several
preferences-related functions to get and set values.

Listing shows a simple example of how to read a preference value from your application. This example uses the NSUserDefaults class to read a value from the preferences created in “Configuring a Settings Page: A Tutorial” and assign it to an application-specific instance variable.

Accessing preference values in an application

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status