diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index bc852b9839..7f5ed9be98 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -23,7 +23,6 @@ NSTextContainer *_textContainer; NSAttributedString *_attributedString; - ASTextKitContextTextStorageCreationBlock _textStorageCreationBlock; } #pragma mark - Lifecycle @@ -35,7 +34,7 @@ constrainedSize:(CGSize)constrainedSize layoutManagerCreationBlock:(NSLayoutManager * (^)(void))layoutCreationBlock layoutManagerDelegate:(id)layoutManagerDelegate - textStorageCreationBlock:(ASTextKitContextTextStorageCreationBlock)textStorageCreationBlock + textStorageCreationBlock:(NSTextStorage * (^)(NSAttributedString *attributedString))textStorageCreationBlock { if (self = [super init]) { @@ -44,7 +43,6 @@ std::lock_guard l(__static_mutex); _attributedString = [attributedString copy]; - _textStorageCreationBlock = [textStorageCreationBlock copy]; // Create the TextKit component stack with our default configuration. if (textStorageCreationBlock) { @@ -81,11 +79,7 @@ - (void)_resetTextStorage { - if (_textStorageCreationBlock) { - [_textStorage setAttributedString:_textStorageCreationBlock(_attributedString)]; - } else { - [_textStorage setAttributedString:_attributedString]; - } + [_textStorage setAttributedString:_attributedString]; } #pragma mark - Setter / Getter