CKTextKitRenderer Class Reference
Inherits from | NSObject |
---|---|
Declared in | CKTextKitRenderer.h |
Overview
CKTextKitRenderer is a modular object that is responsible for laying out and drawing text.
A renderer will hold onto the TextKit layouts for the given attributes after initialization. This may constitute a large amount of memory for large enough applications, so care must be taken when keeping many of these around in-memory at once.
This object is designed to be modular and simple. All complex maintenance of state should occur in sub-objects or be derived via pure functions or categories. No touch-related handling belongs in this class.
ALL sizing and layout information from this class is in the external coordinate space of the TextKit components. This is an important distinction because all internal sizing and layout operations are carried out within the shadowed coordinate space. Padding will be added for you in order to ensure clipping does not occur, and additional information on this transform is available via the shadower should you need it.
– initWithTextKitAttributes:constrainedSize:
Designated Initializer
- (instancetype)initWithTextKitAttributes:(const CKTextKitAttributes &)textComponentAttributes constrainedSize:(const CGSize)constrainedSize
Discussion
Sizing will occur as a result of initialization, so be careful when/where you use this.
Declared In
CKTextKitRenderer.h