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

前端 未结 13 1570
囚心锁ツ
囚心锁ツ 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:31

    Swift 4.x

    UIFont.familyNames().sort( { $0 < $1 } ).forEach({ print("\($0)"); UIFont.fontNamesForFamilyName("\($0)").sort( { $0 < $1 } ).forEach({ print("     \($0)") }) })
    

提交回复
热议问题