YYText
==============
[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/ibireme/YYText/master/LICENSE)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods](http://img.shields.io/cocoapods/v/YYText.svg?style=flat)](http://cocoapods.org/?q= YYText)
[![CocoaPods](http://img.shields.io/cocoapods/p/YYText.svg?style=flat)](http://cocoapods.org/?q= YYText)
[![Support](https://img.shields.io/badge/support-iOS%206%2B%20-blue.svg?style=flat)](https://www.apple.com/nl/ios/)
[![Build Status](https://travis-ci.org/ibireme/YYText.svg?branch=master)](https://travis-ci.org/ibireme/YYText)
Powerful text framework for iOS to display and edit rich text.
(It's a component of [YYKit](https://github.com/ibireme/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 |
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) |
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 |
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) |