I was trying to add custom font to my today extension but UIFont
always return nil
.
Steps:
TodayViewController
of Today Widget but it always return nil
:- (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?
Maybe it's because you forgot to add key in your .plist
file.
Add the key Fonts provided by application
to a new row. Add items for each font you have added.