How to check if a font is available in version of iOS?

前端 未结 13 1572
囚心锁ツ
囚心锁ツ 2020-11-27 14:02

I\'m currently working on an app that uses the \"ChalkboardSE-Regular\" font and my deployment target is 4.0+. This font was not available in 4.1 but it is supported in 4.3

13条回答
  •  被撕碎了的回忆
    2020-11-27 14:30

    For objective-c

    for (NSString *family in UIFont.familyNames) {
        NSLog(@"family %@",family);
        for (NSString *name in [UIFont fontNamesForFamilyName:family]) {
            NSLog(@"      name = %@",name);
        }
    }
    

提交回复
热议问题