IOS excellent framework of TYAttributedLabel (based on the coreText graphic mixed row)

TYAttributedLabel

  • TYAttributedLabel simple, powerful property text controls (no need to understand CoreText)
  • Support rich text, graphic display, support line spacing, word spacing, adaptive height, the number of specified rows
  • Support for adding custom text attributes
  • Support to add attribute text, custom links, add highlights (text and background)
  • Add UIImage and UIView controls

Demo demo

IOS excellent framework of TYAttributedLabel (based on the coreText graphic mixed row)
TYAttributedLabel.gif

Key class introduction

TYAttributedLabel

  • Create label (acceptable text and rich text)
  • Set font spacing
  • Set line spacing
  • Set font size
  • Set the location and width of view, automatically calculate the height
  • Set the link text, and use the proxy (TYAttributedLabelDelegate) method to complete the task after clicking

TYImageStorage

  • Can create a append in the TYAttributedLabel after the picture control, you can customize the image size, and alignment style

TYTextStorage

  • Text file, you can set the text size and font color

TYTextContainer

  • Property text generator (using RegexKitLite)

Specific code and the use of details please see the author of the demo (the author is Chinese), speak in great detail, here will not repeat

  • Link: TYAttributedLabel