Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 09-12-2008, 06:58 AM   #1 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 13
usmanismail is on a distinguished road
Default Application preferences tutorial

A tutorial on how to make your App configurable via the standard Settings App.


IPhone SDK: Application Preferences - a knol by Usman Ismail
usmanismail is offline   Reply With Quote
Old 09-12-2008, 07:03 AM   #2 (permalink)
New Member
 
Join Date: Apr 2008
Location: Germany
Posts: 154
ChriB is an unknown quantity at this point
Default

Awesome, thanks.

Btw: I would prefer posting tutorials here (no subforum I mean):
iPhone SDK Tutorials - iPhone Dev SDK Forum
ChriB is offline   Reply With Quote
Old 09-12-2008, 07:26 AM   #3 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 13
usmanismail is on a distinguished road
Default

Quote:
Originally Posted by ChriB View Post
Awesome, thanks.

Btw: I would prefer posting tutorials here (no subforum I mean):
iPhone SDK Tutorials - iPhone Dev SDK Forum
For some reason it does not let me post in the main forum maybe its because I am a new member.
usmanismail is offline   Reply With Quote
Old 10-18-2008, 04:32 PM   #4 (permalink)
New Member
 
Join Date: Oct 2008
Posts: 5
Pepper is on a distinguished road
Default Choosing a date in application preferences

It is possilbe to add a date element or something to choose a date in the application settings? I can't find something in the documentation from apple.

Thanks in advance
Pepper
Pepper is offline   Reply With Quote
Old 10-18-2008, 08:41 PM   #5 (permalink)
New Member
 
Join Date: Sep 2008
Posts: 13
usmanismail is on a distinguished road
Default No date specifier

As for as I know I have covered the exhaustive list of tools available in Settings Bundle. Sorry. For the date I guess your best option is a combination of multivalue specifiers.

Sorry could not be of more help
usmanismail is offline   Reply With Quote
Old 01-28-2009, 04:57 PM   #6 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 1
t0PD0g is on a distinguished road
Default

Does any of you guys know how to do the gray text that appears in an empty field? Like "Required" or "Ask Every Time" for a password? At first i thought it was what "DefaultValue" was for, but i guess not..
t0PD0g is offline   Reply With Quote
Old 02-23-2010, 04:01 AM   #7 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 91
Sesa is on a distinguished road
Default

How can i make, that the settings is in the app itself and not in the settings "app"
Sesa is offline   Reply With Quote
Old 07-07-2010, 06:53 AM   #8 (permalink)
Registered Member
 
Join Date: Apr 2010
Location: Milano
Posts: 99
zero_ is on a distinguished road
Default

Quote:
Originally Posted by Sesa View Post
How can i make, that the settings is in the app itself and not in the settings "app"

you must design a view and define costant value that you've create in your plist

Code:
#define kUnit			@"unit"
#define kGps			@"gps"
and after read your preference in viewDidLoad or similar in this way (simulating a slider and on/off button)

Code:
	NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 
	onoff.on = [defaults boolForKey:kUnit];
	sliders.value = [defaults floatForKey:kGps];

and after you must save your data in viewWillDisappear or similar method:


Code:
[super viewWillDisappear:animated];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setBool:onoff.on forKey:kUnit]; 
[defaults setFloat:gps.value forKey:kGps];
[defaults synchronize];

In the view you need that settings you must read each time viewWillAppear
Code:
	NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 
	onoff.on = [defaults boolForKey:kUnit];
	sliders.value = [defaults floatForKey:kGps];

hope helps!

Giorgio
zero_ is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,959
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0