Xcode 7 iOS9 font no longer recognized

For iOS 7/8, when setting text options programmatically, it will be displayed as expected when compiling / building to run on the device. However, when testing my application for iOS9 in Xcode 7, all frames of my view are disabled or simply not visible due to the fact that text.font does not recognize the font. This is not a custom font as such, it is in the Apple library, and in fact, when you set a shortcut through IB, it displays correctly, but when you execute the same code in the code, it simply displays the system font. Any ideas how to get around this? This creates a pretty ugly view in iOS9, but everything still displays correctly <= iOS8.

The font in question is "Heiti TC Light"

I received a script message from the Apple Font Book and applied it accordingly:

 @"STHeitiTC-Light" 

Again, it works in all versions of iOS except iOS9

Using Xcode 7.0 beta 3 | iOS 9 simulator

0
source share
1 answer

Apple seems to have concluded support for this particular font in the Xcode assembly. It is displayed only in IB, as it is cached from a previous version of Xcode and saved through the update.

For users with the same problem with their font, it may still be a valid OS font, but it may have removed it from Xcode. I would suggest starting a new project to see if your font is still a supported font, changing the font in the IB of the new project, if it is not specified, you will have to copy the font.ttc from the Font Book into the project and include it in your info.plist like other custom fonts.

+1
source

All Articles