Add ability to customize NSLayoutManager and NSTextStorage when created in the ASTextKitContext

This commit is contained in:
rcancro
2016-02-22 13:00:02 -08:00
parent 896f0adcaf
commit 00b0968bf7
10 changed files with 60 additions and 26 deletions

View File

@@ -213,6 +213,16 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
*/
@property (nonatomic, assign) BOOL passthroughNonlinkTouches;
#pragma mark - ASTextKit Customization
/**
A block to provide a hook to provide a custom NSLayoutManager to the ASTextKitRenderer
*/
@property (nonatomic, copy) NSLayoutManager * (^layoutManagerCreationBlock)(void);
/**
A block to provide a hook to provide a NSTextStorage to the Text Kit's layout manager.
*/
@property (nonatomic, copy) NSTextStorage * (^textStorageCreationBlock)(NSAttributedString *attributedString);
@end