Designing labels/text views with custom fonts in Interface Builder Designing labels/text views with custom fonts in Interface Builder xcode xcode

Designing labels/text views with custom fonts in Interface Builder


Custom fonts can only be set programmatically..Unfortunately..this is termed as a bug in interface builder and hasn't been fixed yet.


using custom fonts in Interface Builder a reusable library is available.

It uses a simple trick for doing this. Set the font(say calibri) to all of your UI Elements that you will never use in your project and FontReplacer will do mapping between custom font and calibri. So there is no need to make IBOutlets or any other graphics.

Here is link to github from where you can download FontReplacer to use in your project. https://github.com/0xced/FontReplacer

another question is addressing same Fonts not displaying in Interface Builderi have also posted possible solution there


As of XCode 6 it now sees the font that I needed to import (Lato).

Haven't tested it much, but works for plain text labels and doesn't for attributed ones.Atrributed shows fine in Interface Builder but defaults to system font at runtime.

Still much better to have it there visually or combine text labels to achieve "attributed" text though!