I was trying to add custom font to my today extension but UIFont
always return nil
.
Steps:
- I added the font file to Today Widget target:
- I check if the font file was inside the Today Widget bundle:
- I init the font instance in the
TodayViewController
of Today Widget but it always returnnil
:
- (void)viewDidLoad {
[super viewDidLoad];
UIFont* ft = [UIFont fontWithName:@"octicons-local" size:20];
}
I used the same method in my main project, and I can get the custom font. How can I fix it?