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 > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 10-31-2011, 01:45 PM   #1 (permalink)
Registered Member
 
Join Date: Oct 2011
Posts: 1
mtbsrams is on a distinguished road
Default Multiple UI Themes or Skins

What is the best method or design for building an application with multiple UI themes?
mtbsrams is offline   Reply With Quote
Old 11-06-2011, 05:53 PM   #2 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,002
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by mtbsrams View Post
What is the best method or design for building an application with multiple UI themes?
There are various ways to do this. Here's one:

A view controller can decide what XIB file to load at run-time. The standard Apple template for universal apps does this based on the type of device that's running.

You could include multiple versions of all your app's XIB files, named using extensions that specify a theme (e.g. "mainViewController_chrome.xib", "mainViewController_walnut.xib", "mainViewController_leather.xib").

Write a front end that lets the user pick a theme, or "skin". Use the user's choice to set a global theme string. Save that theme string into user defaults.

When each view controller is invoked, have it build the name for it's XIB file using the theme string.

Note that because of Apple's restrictions, neither you nor your users would not be able to add skins to your app. You'd have to update the app in order to add new skins.

If you wanted to sell extra skins using in-app purchase, what you would have to do is include all the skins in the app, with the extra-cost skins turned off. When the user purchased a new skin, it would just save a cookie in user defaults that unlocked that skin.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Reply

Bookmarks

Tags
best practices, multiple themes, skins, themes, user interface

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: 380
10 members and 370 guests
bignoggins, djqbert, epaga, hussain1982, jcdevelopments, LunarMoon, markolo, omagod, pinacate, skog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,644
Threads: 94,110
Posts: 402,860
Top Poster: BrianSlick (7,990)
Welcome to our newest member, djqbert
Powered by vBadvanced CMPS v3.1.0

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