mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 21:41:45 +00:00
Merge pull request #674 from adly-holler/editable-text-assert-viewbacked
Assert that ASEditableTextNode stays view-backed
This commit is contained in:
commit
7dbb07161f
@ -11,7 +11,10 @@
|
||||
|
||||
@protocol ASEditableTextNodeDelegate;
|
||||
|
||||
/// @abstract ASEditableTextNode implements a node that supports text editing.
|
||||
/**
|
||||
@abstract Implements a node that supports text editing.
|
||||
@discussion Does not support layer backing.
|
||||
*/
|
||||
@interface ASEditableTextNode : ASDisplayNode
|
||||
|
||||
// @abstract The text node's delegate, which must conform to the <ASEditableTextNodeDelegate> protocol.
|
||||
|
||||
@ -188,6 +188,12 @@
|
||||
_placeholderTextKitComponents.textView.opaque = opaque;
|
||||
}
|
||||
|
||||
- (void)setLayerBacked:(BOOL)layerBacked
|
||||
{
|
||||
ASDisplayNodeAssert(!layerBacked, @"Cannot set layerBacked to YES on ASEditableTextNode – instances must be view-backed in order to ensure touch events can be passed to the internal UITextView during editing.");
|
||||
[super setLayerBacked:layerBacked];
|
||||
}
|
||||
|
||||
#pragma mark - Configuration
|
||||
@synthesize delegate = _delegate;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user