About Text Kit, textkit

Source: Internet
Author: User

About Text Kit, textkit
1. What is Text Kit?

In iOS 7, Apple introducedText Kit-- Text Kit is a fast and modern Text layout and rendering engine. In the UIKit framework, Text Kit defines some classes and related Protocols. Its main function is to provide Text layout and rendering functions for programs. In the program, Text Kit can be used to store, lay out, and use the most detailed typographical method (such as Text spacing, line feed, and alignment) to display text content. Apple introduced the Text Kit not to replace the existing Core Text. The Core Text is mainly used for Text layout and rendering. It is an advanced and underlying technology, if we need to render the Text content directly to the graphic context, the best solution is to use Core Text in terms of performance and ease of use. However, if we directly use some controls provided by Apple (such as UITextView, UILabel, and UITextField) to typeset Text, we will undoubtedly use the APIS provided by Text Kit in the UIkit framework.

2. What can Text Kit do?

  • Paging or multi-column text Layout
  • Supports text wrapping, folding, and coloring.
  • You can adjust the distance, line spacing, text size, and specified font between words.
  • Supports rich text editing and custom text truncation.
  • Supports dynamic styles
  • Support for letterpress)
  • Surround path
  • Dynamic text format and storage
  • Supports data type detection (such as links and attachments)

Http://blog.jobbole.com/51965/

3. Text Kit Architecture & principles

Next, let's take a look at the Text Kit architecture through figure 1 (from WWDC2013 Session 210. Figure 1 is drawn based on iOS 7. We can see that the Text Kit is built based on Core Text and interacts with Core Graphics through Core Text. The UI controls (UILabel, UITextField, and UITextView) are built on the Text Kit. It can be seen that these Text controls can use the APIS provided by the Text Kit to typeset and render texts. We can also see that the UIWebView provided by the SDK is based on WebKit, and it cannot use the function provided by Text Kit.

Figure 1 Location of Text Kit in iOS 7 SDK

Let's take a look at how the related components in Figure 1 correspond in iOS6, as shown in Figure 2. We can see that there is no Text Kit in iOS 6, UILabel, UIText, and UITextView are built based on String Drawing and WebKit. Here, String Drawing communicates directly with Core Graphics.


Figure 2 There is no Text Kit in iOS 6

I have written a lot about the principles and practices. For details, refer to the following link:

Ship breaking product

Http://beyondvincent.com/blog/2013/11/12/121-brief-analysis-text-kit/

Raywenderlich Tutorials (link: Chinese)

Http://www.raywenderlich.com/zh-hans/53890/text-kit-%E6%95%99%E7%A8%8B%EF%BC%88%E4%B8%80%EF%BC%89

Http://www.raywenderlich.com/zh-hans/53889/text-kit-%E6%95%99%E7%A8%8B%EF%BC%88%E4%BA%8C%EF%BC%89



4. Related code & ADVANCED MATERIALS

Official example of Apple:

  • IntroToTextKit

Apple official reference documents:

  • Text Programming Guide for iOS.pdf
  • Core Text Programming Guide
  • NSLayoutManager Class Reference for iOS.pdf
  • NSLayoutManagerDelegate Protocol Reference for iOS.pdf
  • NSTextContainer Class Reference for iOS.pdf
  • NSTextStorage Class Reference for iOS.pdf
  • NSTextStorageDelegate Protocol Reference for iOS.pdf

Wwdc video:

  • Introducing Text Kit
  • Advanced Text Layouts and Effects with Text Kit
  • Using Fonts with Text Kit





I want to learn more about ancient Egyptian text and Latin. What textbooks are better? It is better to have a Chinese version and systematic learning.

There is no systematic tutorial in Chinese. Only English letters can be recommended ~~

Egypt:
You can find the seeds of Egyptian Language and Culture Learning Pack on the Internet. I have only looked for this resource. There are quite a few of them, and many books have been collected in Egyptian, grammar, and dictionary.
~~ There is also three of The Oxford Encyclopedia of your ent Egypt in The bag, which closes thousands of pages.

Latin:
BLD Latin for Beginners
AG's New Latin Grammar
These two books are enough to get started. You can download them from many places, such as textkit.com/latin_grammar.php.
Other ~~

Dictionary ~~ Oxford Latin Dictionary and Lewis & Short are essential.
The grammar book actually reads the teaching material and the AG book mentioned above.
You can read another Wheelock's Latin.
The style of Cambridge Latin Course and Oxford Latin Course is unknown ~~
There are also entry-level reading materials ~~ Caesar's galuo war

Not only reading books, but other network resources should also be used, such as crisis, Google
Latin Library station I deleted offline images ~~

I don't know much about the introduction to Latin. Can you help me?

The best (and the only) entry-level teaching material for Latin in China is the foundation of Latin published by Xiao Yuan and the business press. Unfortunately, this book is out of print. I have contacted the publishing house many times, and the other party has never meant a duplicate version.
I used to find someone to print a few copies. Unfortunately, it's too late for you. I don't know when to print it next time.

Currently, we can buy regular Latin textbooks written by sindelin and published by the Foreign Language Teaching and Research Press. This book covers all aspects of text, speech, morphology, and syntax. Disadvantage: this is not a textbook. It is more like a grammar. It will be very hard for people without foundation to read it. However, I think that people who want to seriously study Latin (and the ancient Greek) should prepare such a book for reference at hand.

However, if you can still use English, I have an electronic copy of the first two copies of Cambridge Latin Course (PDF ). It must be enough to get started with them. It is much easier to read grammar-oriented books such as Latin and Greek after reading them.
If you want to, please leave me a mailbox with enough space.

In addition, this website has many electronic versions of Latin and ancient Greek textbooks in the early part of the last century. If you are interested, you can download:
Www.textkit.com
In the textbooks, I think Latin for Beginners is the most suitable for Beginners.

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.