sagarkothari
sagarkothari

Reputation: 24810

Create settings for myApplication Iphone

I am new to iPhone development.

I've seen many applications, which have their settings stored in the iPhone's setting app. For example, Default User Name & Password are stored in settings for "myApp."

Whenever the user starts "myApp", userName & password are loaded from the settings app.

How would I implement this functionality into my own app?

any links / any help / any source code / samples

Thanks in advance for being nice to me.

Upvotes: 0

Views: 3709

Answers (2)

AlBlue
AlBlue

Reputation: 24040

[NSUserDefaults standardUserDefaults] will get you the defaults object, from which you can access keyFor and setKeyFor to get/set values. For example [[NSUserDefaults standardUserDefaults] boolForKey:@"UseSounds"] returns 'true' if the user has elected to turn sounds off, and your settings pane defines 'UseSounds' as the key.

NSUserDefaults reference

Upvotes: 1

zpesk
zpesk

Reputation: 4353

Here are some relevant docs to take a look at:

  1. Apple's doc for settings within the settings app
  2. tutorial on creating settings within the settings app

Upvotes: 2

Related Questions