November 2013
Intermediate to advanced
576 pages
19h 3m
English
One of the most interesting features of TextKit is Content Specific Highlighting. Before iOS 7, using CoreText to modify the appearance of specific strings inside of a text view was elaborate and cumbersome. iOS 7 brings many improvements to rich text rendering and definition.
To work with custom attributed text, a subclass of an NSTextStorage is created, called ICFDynamicTextStorage in the sample project. This approach will allow the developer to set tokens for different attributed strings to be rendered per string encountered. A classwide NSMutableAttributedString is created, which will hold on to all the associated attributes for the displayed text.
- (id)init{ self = [super
Read now
Unlock full access