Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot apply some font as custom font on xcode 4.2 for develop iOS 5 application

Since I installed Xcode 4.2 in order to test iOS 5. I got the following warning after compile the project.

"Using the font Arial - Black in version of Xcode prior to 4.2 may have unexpected results."

And also I could not change the font because it will be crashed when I press the font menu.

Any suggestion?

Thanks.

like image 914
Kimkind Yeung Avatar asked Aug 02 '11 07:08

Kimkind Yeung


People also ask

How do I add custom fonts to Xcode?

To add a font file to your Xcode project, select File > Add Files to “Your Project Name” from the menu bar, or drag the file from Finder and drop it into your Xcode project. You can add True Type Font (. ttf) and Open Type Font (. otf) files.


2 Answers

In IB, click on the File Inspector (first icon in the Utility View) and under "Document Version" change the Development value to 4.2 (or greater).

like image 100
Brett Hamlin Avatar answered Oct 09 '22 14:10

Brett Hamlin


I had same problem, but I changed the Font of the control from interface builder to "system". Then I programmatically set the font, I wanted to display, using setFont method. Its working fine for me. I hope it should work for you too.

like image 40
iHS Avatar answered Oct 09 '22 16:10

iHS