Tutorial on using a custom font
- Get your font
Go to your favorite font website and download a font. I will go to http://www.dafont.com/ and download one. Unzip the download and you should see a *.ttf file. - Add to your project
Drag and drop the *.ttf file directly into your Xcode project. A dialog will appear. Make sure you add checkmarks to Destination and your target application.
- Add to your info.plist
Select the last item in your info.plist and click the "+" button. Select "Fonts provided by application" (start typing in "Fonts" and it will show up). Expand this item and in the empty space next to "Item 0" type in the full name of your font file. (I just copy and paste the file name.)
- Change the font on your label
Add a label to your UI and change the font. You have to select "Custom" first. Then you can change the font's family to your custom font's name.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.