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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-11-2010, 12:40 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 31
Default Setting Bundle Updated

I really have no idea how to do this. i have a settings bundle which changes stuff in my app but i cant do the opposite.

heres how it is, i have a toggle in settings and i can toggle it and it changes stuff in the app.

but i also have an alertview that pops up only once at the beginning and it should update the settings toggle but i dont know how.

so app launches, alertview shows up, tap yes or no.
yes = 1, no = 0.
that is what doesnt work.

any ideas?
pete42 is offline   Reply With Quote
Old 01-11-2010, 01:07 AM   #2 (permalink)
Etched In
 
ansonl's Avatar
 
Join Date: May 2009
Location: Fremont, California
Posts: 238
Default

Quote:
Originally Posted by pete42 View Post
I really have no idea how to do this. i have a settings bundle which changes stuff in my app but i cant do the opposite.

heres how it is, i have a toggle in settings and i can toggle it and it changes stuff in the app.

but i also have an alertview that pops up only once at the beginning and it should update the settings toggle but i dont know how.

so app launches, alertview shows up, tap yes or no.
yes = 1, no = 0.
that is what doesnt work.

any ideas?
Code:
if (//check for first run by checking for and making nonexistent variable in userdefaults)		
UIAlertView *settingsAlert = [[UIAlertView alloc] initWithTitle:@"Message here "   delegate:self cancelButtonTitle:nil otherButtonTitles:@"Yes", @"No Tilts", nil];
		[settingsAlert show];
		[settingsAlert release];
	

-(void)alertView:(UIAlertView *)alertView 
clickedButtonAtIndex:(NSInteger)buttonIndex {	
if (buttonIndex == 0)
{
//Set settings value to 0
}
if (buttonIndex == 1)
{
	
//Set settings value to 1
}
}
I didn't test the code above, but as long as you can fill up the comments part with the actual code(google), it should work.
__________________
Look...

Apparent Etch
ansonl is offline   Reply With Quote
Reply

Bookmarks

Tags
settings, table, tableview, view, viewcontoller

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
» Online Users: 344
20 members and 324 guests
ADY, Dani77, e2applets, Herbie, JasonR, keeshux, linkmx, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

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