I need to write a iOS Objective-C app that supports Themes. The idea is that through some configuration control panel, the user is able to select one of the three hypothetical themes {redTheme, greenTheme or blackTheme} that are predefined in my app, according to the following schema:
1theme http://www.timotteo.com.ar/ThemeChart.png
The user could also even choose the new theme while he is seing the view, and the view would automatically redraw (although this is not a fundamental feature). I would also expect to have a basic theme, (for example whiteTheme). The themes would customize not only the background colors of the view, but they would also customize the images of the UIButtons, UISliders, etc.
My question is: is there a design pattern that would help me solve this problem? Or at least some OOP concept? Any direction is appreciated. Txs in advance
Well from the nice diagram you prepared it looks a lot like Strategy Pattern (or any number of similar patterns). See more at: http://en.wikipedia.org/wiki/Strategy_pattern
Kind regards,
Bo