objective c - How to change iOS system font dynamically but remember original font? -


i able change language of ios app on fly without terminating app. however, want change system fonts on fly because standard helvetica neue fonts don't languages. i'm going use category this answer , include in .pch:

@implementation uifont (sytemfontoverride) #pragma clang diagnostic push #pragma clang diagnostic ignored "-wobjc-protocol-method-implementation"  + (uifont *)systemfontofsize:(cgfloat)fontsize {     return [uifont fontwithname:@"font name" size:fontsize]; }  #pragma clang diagnostic pop @end 

however, when in english want use default system fonts vary ios version , device. my question how can achieve this

static uifont *defaultregularfont = [uifont systemfontofsize:12];   

so can reuse when app switches english this

+ (uifont *)systemfontofsize:(cgfloat)fontsize {     ...     // if english     return [uifont fontwithname:[defaultregularfont fontname] size:fontsize]; } 


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -