Custom fonts in Interface Builder Custom fonts in Interface Builder ios ios

Custom fonts in Interface Builder


Yes, Marrius is right. In Xcode 6, you neither need to use extra software nor to set Font in Code files. Just add your font files in your project along with other files. And Interface builder will display the added fonts in the Custom Font List.

And the most amazing thing is, xcode 6 shows the applied font instantly in IB. This is the great addition by Apple.

Also make sure to add this key "Fonts provided by application" in your project's info.plist and provide your font file names to see the effect in devices.


In Xcode 6, we have custom fonts available in interface builder.

No need for extra software. Thank you Apple!


In Xcode 6, just add the ttf file in your project and use it in storyboard through custom fonts.If you directly want to use it in your code without using it in storyboard then you have to add key "UIAppFonts" in projectName-Info.plist.

Example:

<key>UIAppFonts</key> <array>    <string>Signika-Bold.ttf</string>    <string>Signika-Regular.ttf</string>    <string>Signika-Light.ttf</string>    <string>Signika-Semibold.ttf</string></array> 

just before the line </dict> in projectName-Info.plist.

UIFont* font  = [UIFont fontWithName:@"Signika-Regular" size:25];