Custom fonts not working in Xcode 9. However if I open the same project in Xcode 8, the custom fonts work as expected
I've ran this piece of code to ensure the fonts show up:
NSArray *fontFamilies = [UIFont familyNames];
for (int i = 0; i < [fontFamilies count]; i++)
{
NSString *fontFamily = [fontFamilies objectAtIndex:i];
NSArray *fontNames = [UIFont fontNamesForFamilyName:[fontFamilies objectAtIndex:i]];
NSLog (@"%@: %@", fontFamily, fontNames);
}
I've ensured the fonts are in the plist, checked target membership, and in the copy bundle resource section.
Is this an Xcode bug?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…