YYText
Powerful text framework for iOS to display and edit rich text.
(It's a component of YYKit)
Features
UILabel and UITextView API compatible
High performance asynchronous text layout and rendering
Extended CoreText attributes with more text effects
Text attachments with UIImage, UIView and CALayer
Custom highlight text range to allow user interact with
Text parser support (built in markdown/emoticon parser)
Text container path and exclusion paths support
Vertical form layout support (for CJK text)
Image and attributed text copy/paste support
Attributed text placeholder support
Custom keyboard view support
Undo and redo control
Attributed text archiver and unarchiver support
Multi-language and VoiceOver support
Interface Builder support
Fully documented
Architecture
YYText vs TextKit
Text Attributes
YYText supported attributes
Demo
Attribute Name
Class
TextAttachment
YYTextAttachment
TextHighlight
YYTextHighlight
TextBinding
YYTextBinding
TextShadow
TextInnerShadow
YYTextShadow
TextBorder
YYTextBorder
TextBackgroundBorder
YYTextBorder
TextBlockBorder
YYTextBorder
TextGlyphTransform
NSValue(CGAffineTransform)
TextUnderline
YYTextDecoration
TextStrickthrough
YYTextDecoration
TextBackedString
YYTextBackedString
###CoreText attributes which is supported by YYText
Demo
Attribute Name
Class
Font
UIFont(CTFontRef)
Kern
NSNumber
StrokeWidth
NSNumber
StrokeColor
CGColorRef
Shadow
NSShadow
Ligature
NSNumber
VerticalGlyphForm
NSNumber(BOOL)
WritingDirection
NSArray(NSNumber)
RunDelegate
CTRunDelegateRef
TextAlignment NSParagraphStyle(NSTextAlignment) LineBreakMode NSParagraphStyle
(NSLineBreakMode) LineSpacing NSParagraphStyle
(CGFloat) ParagraphSpacing
ParagraphSpacingBefore NSParagraphStyle
(CGFloat) FirstLineHeadIndent NSParagraphStyle
(CGFloat) HeadIndent NSParagraphStyle
(CGFloat) TailIndent NSParagraphStyle
(CGFloat) MinimumLineHeight NSParagraphStyle
(CGFloat) MaximumLineHeight NSParagraphStyle
(CGFloat) LineHeightMultiple NSParagraphStyle
(CGFloat) BaseWritingDirection NSParagraphStyle
(NSWritingDirection) DefaultTabInterval
TabStops NSParagraphStyle
CGFloat/NSArray(NSTextTab)
Usage
Basic
// YYLabel (similar to UILabel)
YYLabel *label = [YYLabel new];
label.frame = ...
label.font = ...
label.textColor = ...
label.textAlignment = ...
label.lineBreakMode = ...
label.numberOf