I have used a custom font in my previous app.
The file name was \"ProximaNova-Regular.otf\" and to load the font I just used...
[UIFont fontWithName:
If you want to find the font name for a given font file programmatically:
import Foundation
func loadFontName(for file: URL) throws -> String {
let data = try Data(contentsOf: file)
guard let provider = CGDataProvider(data: data as CFData) else {
throw Error("Could not create data provider")
}
guard let font = CGFont(provider) else {
throw Error("Could not load font")
}
guard let name = font.postScriptName else {
throw Error("Could not get font name from font file")
}
return name as String
}
Replace with your own throwable Error objects as required.