Theming system for iOS application

Discussion in 'iOS Programming' started by psychotronic, Aug 3, 2010.

  1. psychotronic macrumors newbie

    Mar 12, 2009
    Hi all,
    I'm on a develepment process of my ipad application and I plan to include a theming system for my app. So the app itself will be delivered in two themes, let say a brigth style and dark style, and user will able to switch the theme and using what style they preferred.
    I've tried to search any tutorial / reference about it, but have no luck :(
    So i if you know one please let me know ;)

    Also, I also wondering if this theming system will be allowed by apple? I heard that most of rejected application is because of viiolation of apple’s Human Interface Guidelines. Will this theming system violate HIG?

  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    I don't think there's anything against having themes in the HIG. I assume that you're talking about a set of fonts, background colors, tint colors for navbars and so forth.

    UIKit has a set of standard colors and systemFonts and a few other things that loosely describe an OS theme. Is it a theme if there's only one?

    You might think about how Apple does it and do something similar. Namely set up a number of categories on NSColor and NSFont that return the theme colors and fonts and whatever else. Then have those methods return their values based on a theme setting. So if theme is Dark then return the dark color, light then return the light color. Then of course throughout the app whenever the code creates a UIKit object it sets the fonts, colors etc based on these theme colors and fonts.

Share This Page