November 2013
Intermediate to advanced
576 pages
19h 3m
English
Each NSLayoutManager has an associated NSTextStorage that acts as a subclass of NSMutableAttributedString. Readers familiar with Core Text or Mac OS X text rendering might be familiar with an attributed string, which is used for storage of stylized text. An NSTextStorage provides an easy-to-interact-with wrapper for easily adding and removing attributes from text.
NSTextStorage can be used setAttributes:range: to add new attributes to a string; for a list of attributes see Table 21.1. Polling the text for currently enabled attributes can be done using attributesAtIndex:effectiveRange:.
Table 21.1 Available Text Attributes
Read now
Unlock full access