Tips: How To Use Custom Fonts In iOS Application

To add custom fonts to an iOS application you need to:

Step 1: Include the font into the XCode project

Download the font you want to add (usually TTF or OTF). Select a group where you want to keep your font, and click “Add Files To…”. Locate your font, and click Add button.

Make sure that the right target is checked, and “Copy items if needed” is on.

Step 2: Include your font into the project Info.plist

Go to Info.plist file, and add a new key “Fonts provided by application”. Add {file-name} of your font to the list.

Step 3: Init UIFont instance

UIFont(name: "OpenSans", size: 12)
Like what you read? Give Alexander Martirosov a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.