40

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.”

Tim Arnold
  • 8,359
  • 8
  • 44
  • 67
  • I am seeing the same issue. No matter what I do, I cannot get the auto-generated launch image to show any font other than the standard built-in fonts. My custom font just will not work. The [documentation](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html#//apple_ref/doc/uid/TP40012582-CH28-SW4) doesn't mention anything around the use of custom fonts unless perhaps a custom font is considered a runtime attribute. – lidsinker Sep 22 '14 at 04:13
  • It's definitely not documented, @lidsinker, but see my update: it seems like the launch interface may be totally separate from your app bundle. – Tim Arnold Sep 22 '14 at 15:08
  • @TimArnold - Have you found out anything new related to this? Or any workarounds. – Stephen Watkins Jan 06 '15 at 21:16
  • @StephenWatkins Unfortunately no – Tim Arnold Jan 07 '15 at 18:39
  • I'm with the same problem – ricardopereira Jul 22 '15 at 09:10

4 Answers4

7

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

Sn0wfreeze
  • 1,959
  • 3
  • 18
  • 32
  • 4
    Fonts are working throughout my app, and, as noted, the font appears in Interface Builder while I'm building the interface. So I don't think it's an issue with fonts being properly bundled. – Tim Arnold Sep 16 '14 at 14:17
  • 6
    Tim is the font displaying properly in iOS8 simulator? Right now I'm experiencing similar issue, custom font working fine in IB and in iOS7 but iOS8 is reverting it to system font – Michał Zygar Sep 22 '14 at 19:38
  • 3
    This happens when using an attributed string in Interface builder for iOS 8 for me as well. Did anyone come across a fix for this? – Emin Israfil Oct 02 '14 at 17:34
4

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.

Chloe Unrau
  • 87
  • 1
  • 2
  • *Tiny tip for multiple fonts:* click the first file, then `shift+click` the last to select all of them, now checking the box under **Target Membership** will check all of them... – Aviel Gross Jun 02 '15 at 08:42
4

I faced the same problem, even after double checking all the steps described in the really good cheat sheet provided by codewithchris.

In my case it was related to the size classes and I could quickly fix it by deleting the size classes customization:

enter image description here

pommefrite
  • 819
  • 10
  • 12
1

I've also encounter the same bug. My fixes is to use an image...

imcc
  • 879
  • 2
  • 10
  • 15