Selecting a custom Font in launch Screen using SwiftUI Xcode 15

61 views Asked by At

I can't get my custom font to show up in the attribute inspector of a launch screen I added to my project. Can this be done in a added launch Screen in SwiftUI?

I added a new launch Screen to my project -Installed the fonts into the system Font Book and works in textedit -Added the fonts to the project copying and adding them to folders and targets -Added the fonts to the custom target iso properties -> Fonts provided by the application -Run the below code and the font family and fonts are printed -Able to see the font in preview -Restarted the Mac and Xcode -Changed the font colour to refresh the font

// I see the font name and can use it in the ContentView but not the     launch screen attribute inspector -> custom -> [select custom .ttf     font here]
    init() {
    for familyName in UIFont.familyNames {
        print(familyName)
        for fontName in UIFont.fontNames(forFamilyName: familyName){
            print("--\(fontName)")
        }
    }
 }
0

There are 0 answers