IOS How to load custom font for apps

+ (void) loadFontForApp { // Get the path to our custom font and create a data provider.
    NSString *fontPath = [[NSBundle mainBundle] pathForResource:@"customfont" ofType:@"ttf"];
    CGDataProviderRef fontDataProvider = CGDataProviderCreateWithFilename([fontPath UTF8String]);
    // Create the font with the data provider, then release the data provider. customFont =
    CGFontCreateWithDataProvider(fontDataProvider);
    CGDataProviderRelease(fontDataProvider);
}

Comments

Popular posts from this blog

Java : Variables Declaring

Install DNF in RHEL/CentOS 7

SQL Self JOIN