Does anyone know what is best way to implement setting concept for changing themes throughout the app including the font colour, font family name and font Size in iOS 7
Thanks in advance
You could make a CSS type Style Sheet class in your code where you define all your font type, colours, etc. using macros and use those macros for setting those fields at the required places. When the user goes to the settings page and chooses a different theme, you just need to handle those macros. Hope it helps.
Related
Is it possible to customise say the colour of the button on the snipcart checkout? Or the font family?
I looked at some tutorials but they seem to be for an old version
The same approaches to customize the cart can be used for the V3 and more.
In your case, you can change colors and fonts by overriding the CSS.
To do this, add a separate CSS file after the one provided by Snipcart with your own CSS rules targeting the same selectors.
I'm using a custom font for English version of my app, before localizing for other languages, the font displayed fine, then I localized the app for Chinese, the custom font is replaced by system font when I run it, though it still looks right on the storyboard.
I set the font in storyboard, I think it's a easier approach as I have multiple view controllers using this font in different places, it'd be a little complicated to set font with code, here's the storyboard setting:
and info.plist:
localization:
So, what's wrong?
Problem solved by disabling localization of the font like this:
Is it possible to redefine standard text styles: UIFontTextStyleBody, UIFontTextStyleHeadline, etc.?
Seems that it's not.
As I understand it's similar to the custom CSS sheet in Safari — user select fonts he like, and then he see those fonts in apps, that support dynamic fonts.
Maybe UIAppereance can be to help? It allows you to set fonts and styles for any kind of view/element in any controller.
I'd hoped to find that someone's worked out a means to provide a choice of colors from the application settings (even with InAppSettings) with some kind of view of the (graphical) color swatch itself. My fallback implementation is a settings child pane of text multi-values of a small set of colors obviously without any swatch (unless there's a way of using icon.pngs therein).
Is someone aware such an implementation?
There is currently no approved way to do what you ask besides RGB values, and even then it's not user friendly. I can recommend two projects if you would like to provide a pallet in-app though:
IL Color Picker is simply excellent. I cannot recommend it highly enough. It's intuitive, and unique, and it looks like photoshop's implementation.
Color Picker a control styled like a nib's default color pallet.
Is there a way to set style or look and feel for ipad application as it works for java applications?
In particular, i want to set my custom Font application-wide, so that all buttons/labels/whatever created would use my Font by default. All that i found so far concerning fonts suggests that every single control i create should be set up individually. Is it so or is there way to set up default Font properties for whole project?
This is usually a bad idea from the UI viewpoint, therefore there is no “skinning” support in iOS. (Java has it different, because it wants to support different systems with different UI metaphors.) If you want to use a custom font, you can create custom subclasses of the UI components that will set your font after awaking from NIB or after the instance is created in code.