The Roboto Font Loader lazy loads the Roboto font.
- Xcode 7.0 or higher.
- iOS SDK version 7.0 or higher.
To add this component to your Xcode project using CocoaPods, add the following to your Podfile
:
pod 'MDFRobotoFontLoader'
Then, run the following command:
pod install
The Roboto Font Loader provides APIs for getting the Roboto Fonts. Consider using the Typography Material Component for iOS font styles recommended by Material spec.
Before using Roboto Font Loader, you'll need to import it:
#import "MaterialRobotoFontLoader.h"
import MDFRobotoFontLoader
The Roboto Font Loader Component depends on the FontDiskLoader Component.
UIFont *font = [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:16];
let myFont:UIFont = MDFRobotoFontLoader.sharedInstance()regularFontOfSize(16)