Mac Softwares and CheatSheet iPhone Note #11: Unit Testing
Sep 04

settings-overview.gif

1. Create a directory on your desktop, name it “Foo”

2. Download this Sample_plist.txt and place it inside foo. Name it as Root.plist

Foo/
Foo/Root.plist

3. Rename Foo to Settings.bundle

Settings.bundle/
Settings.bundle/Root.plist

4. Drag it to your project.

settings-bundle.gif

5. To retrieve a value from the settings.. For example, if we want to retrieve if the “enabled” switch is on or off?

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
BOOL b = [defaults boolForKey:@"enabled_preference"];

Leave a Reply

Security Code:

preload preload preload