Assert against the user trying to set isLayerBacked on ASEditableTextNode

This commit is contained in:
Adlai Holler
2015-09-21 00:15:03 -07:00
parent 48b0525f76
commit a1ffa499cb
2 changed files with 6 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
@protocol ASEditableTextNodeDelegate; @protocol ASEditableTextNodeDelegate;
/// @abstract ASEditableTextNode implements a node that supports text editing. /// @abstract ASEditableTextNode implements a view-backed node that supports text editing.
@interface ASEditableTextNode : ASDisplayNode @interface ASEditableTextNode : ASDisplayNode
// @abstract The text node's delegate, which must conform to the <ASEditableTextNodeDelegate> protocol. // @abstract The text node's delegate, which must conform to the <ASEditableTextNodeDelegate> protocol.

View File

@@ -188,6 +188,11 @@
_placeholderTextKitComponents.textView.opaque = opaque; _placeholderTextKitComponents.textView.opaque = opaque;
} }
- (void)setLayerBacked:(BOOL)layerBacked {
ASDisplayNodeAssert(!layerBacked, @"Cannot set isLayerBacked to YES on ASEditableTextNode all instances are view-backed.");
[super setLayerBacked:layerBacked];
}
#pragma mark - Configuration #pragma mark - Configuration
@synthesize delegate = _delegate; @synthesize delegate = _delegate;