Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using custom fonts with Xcode 6 / iOS 8 Interface Builder Launch Screen

I'm using Xcode 6’s new interface builder-based launch images, and am running into an issue.

I created a new interface builder file by selecting New File, Launch Screen, which created a .xib file in my project.

Launch Screen Creation

I then designed my launch screen, and everything works great, except: I have a custom font, which I’ve assigned to a UILabel in Interface Builder. The font appropriately appears in Interface Builder, but when the .xib is used to generate launch images, the system font is used.

Any ideas?

Update 2014-09-16

I learned something on Twitter from @flo_muc that might be relevant:

“TIL: iOS 8 has it’s own deamon for displaying xib based launch images called splashboardd. So this xib is running outside of your scope.”

like image 979
Tim Arnold Avatar asked Sep 11 '14 18:09

Tim Arnold


People also ask

How do I add custom fonts to Xcode?

To add a font file to your Xcode project, select File > Add Files to “Your Project Name” from the menu bar, or drag the file from Finder and drop it into your Xcode project. You can add True Type Font (. ttf) and Open Type Font (. otf) files.


2 Answers

Did you actually added it to the plist File?

Here's a short introduction how to do this: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

Greetings, Alex

EDIT: Actually I tried to add my own fonts to my with the interface Builder and it doesn't work. Seems to be a bug... This bug only appears, when I use an attributed String

like image 74
Sn0wfreeze Avatar answered Oct 09 '22 02:10

Sn0wfreeze


I found a solution that works for me. I was having the same problem you've described, and I came across this helpful page:

http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

The key step that I was missing was step #2: Click on each of your fonts in the Project Navigator, and check the box for your project under Target Membership in the File Inspector.

like image 21
Chloe Unrau Avatar answered Oct 09 '22 04:10

Chloe Unrau