Add an ASEditableTextNode initializer that allows customization of its ASTextKitComponents

This commit is contained in:
Eric Jensen
2016-03-25 22:23:03 -07:00
parent f8f3585764
commit 0d52176e03
3 changed files with 22 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
*/
#import <AsyncDisplayKit/ASDisplayNode.h>
#import <AsyncDisplayKit/ASTextKitHelpers.h>
NS_ASSUME_NONNULL_BEGIN
@@ -18,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface ASEditableTextNode : ASDisplayNode
/**
* @abstract Initializes a editable text node with a provided TextKit stack.
*
* @param textKitComponents The TextKit stack used to render text.
* @param placeholderTextKitComponents The TextKit stack used to render placeholder text.
*
* @returns An initialized ASEditableTextNode.
*/
- (instancetype)initWithTextKitComponents:(ASTextKitComponents *)textKitComponents
placeholderTextKitComponents:(ASTextKitComponents *)placeholderTextKitComponents;
//! @abstract The text node's delegate, which must conform to the <ASEditableTextNodeDelegate> protocol.
@property (nonatomic, readwrite, weak) id <ASEditableTextNodeDelegate> delegate;