how to load a custom font in iOS app from a file (not from info.plist)?
问题 I am wondering if it's possible to load a font from a file (say, internet URL) into my iOS app, before using it in my controls (UILabel, UIButton, etc). I already know the usual technique of pre-packaging it and referencing inside info.plist, but I'm looking for a less static option.... doable? Thanks! 回答1: Yes. It's absolutely possible. You need to look at CTFontManagerRegisterGraphicsFont . Here’s a usage example: NSData *inData = /* your decrypted font-file data */; CFErrorRef error;