iOS text icon

Source: Internet
Author: User

How to use a custom font

Before you speak the icon font, first look at how normal custom fonts are used in iOS, and the two principles are the same. Here take Kaushanscript-regular as an example:

Step 1: Import font files

Drag a font file into the project (iOS supports font formats:. TTF,. OTF, other formats are not determined):

Then, in the project's resource pool, confirm that the font files are joined to the project, open the Xcode project in build phases to view:

Step 2: Configure the. plist file

UILabel *label5 = [[UILabel alloc] Initwithframe:cgrectmake (Ten, 480, +)];label5.text = @ "\u0000e42a\u0000e525\ U0000e41c "; [Self.view Addsubview:label5];
6. Effects

7. Use the homemade icon font

If the icon library described above does not meet your needs, or if the desired icon is distributed across multiple icon libraries and cannot be centralized into a single font file, then you may need to make an icon font file yourself.

Summarize

In this way, in iOS development, not only can go directly to open-source icon library to find ready-made icons used in the project, but also can easily change the color of the icon, size, I believe that can liberate a lot of designers and engineers work.

On the Code
    • Demo
Icon Font Library
    • Fontello
    • Etao Icon Font Library (here is a question to note that the Etao icon font named "Untitled1", is not the generation of the font of the classmate negligence? )
    • Icomoon
    • Emoji Expression Gallery

iOS text icon

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.