Search code examples
iphonefontspixate

Change System Font for iPhone application - entire Application


Is there a way I can change the System Font for an entire Application?

I want to define the font for the entire Application so that I don't have to go to individual labels or individual fonts to change it. I would like a universal definition which will change all the fonts that exist within the application. How do I do this?


Solution

  • Make a shared class called Constants.h or something. In it do this:

    #define kStandardFont [UIFont systemFontOfSize:20] 
    

    Of course adjust the font to be what you need it to be. Then, whenever you need to use it (in a label or whatever) do this:

    #import "Constants.h"
    …
    …
    … 
    [label setFont:kStandardFont];