I thought the custom font is how complicated work, in fact, for our siege lion rinsed things, remember one interview was asked this question, suddenly asked, because did not contact before.
Do not be intimidated by the problem, the first step: To download the font library online, there are two files. OTf and. TTF, iOS5.0 can only be used after the. OTf. TTF is not limited, so here we select the. ttf file to drag into the project
Step Two: Add font configuration information to the Info.plist to add font text to the project. Such as:
Step Three: You can check if the file has been added to the project, Build phases, Code boundle resourses
Fourth: At the most critical time, is how to use.
eg
Uifont *font = [Uifont fontwithname:@ "Microsoftyahei" size:18.0f];
Finished, it is so simple, read the classmate, remember the next time someone asked you do not forget, direct answer, so simple how can not know it. A little bit more students, directly said I have a font library, and then is to add it. Haha, the addition of custom fonts is here.
Add a custom font to iOS