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 Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-16-2011, 05:40 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Location: Darlington UK
Posts: 84
kampftrinker is on a distinguished road
Default Changing themes

Hi, if I have a few different themes for my app e.g. Black, Red and Blue and I set the default to Black.

I understand I could change the theme and have it work across the apps different views using a simpleton class.

If the user changed to the Red theme how would I ensure that when the next time the app started, the Red theme would be loaded by default? Where would I store this value?

Thanks
Mick
kampftrinker is offline   Reply With Quote
Old 02-16-2011, 05:44 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

Actually, what you probably meant was Singleton, not simpleton

But I don't think that's what you need for such a task. You can apply a theme at view load, depending on what the view contains it could be just a few lines to set the colors of objects, or load different images from the bundle.

You can use NSUserDefaults to save the name of the theme the user chose, and when you are about the load the view, check what is saved and load the right theme.
baja_yu is offline   Reply With Quote
Old 02-16-2011, 06:23 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Location: Darlington UK
Posts: 84
kampftrinker is on a distinguished road
Default

Lol I can't believe I put simpleton! ( it's been a long day)
Thank for the advice I'll give that a go.

Mick
kampftrinker 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
» Online Users: 369
10 members and 359 guests
cpsclicker, Error404, gmarro, jeroenkeij, Kirkout, Music Man, PavelMik, teebee74, whitey99
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,666
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, cpsclicker
Powered by vBadvanced CMPS v3.1.0

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