mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-03-29 08:39:00 +08:00
Merge pull request #1084 from lkzhao/master
Update comments for ASPanningOverriddenUITextView
This commit is contained in:
@@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
@abstract Enable scrolling on the textView
|
||||
@default true
|
||||
*/
|
||||
@property (nonatomic) BOOL scrollEnabled;
|
||||
|
||||
|
||||
@@ -16,8 +16,19 @@
|
||||
#import "ASTextNodeWordKerner.h"
|
||||
#import "ASThread.h"
|
||||
|
||||
//! @abstract This subclass forces the parent UITextView's scrollEnabled property to always be true. Instead, it disables the panGestureRecognizer when scrollEnabled is set to false. This ensures that the contentSize is caculated correctly.
|
||||
//! See issue: https://github.com/facebook/AsyncDisplayKit/issues/1063
|
||||
/**
|
||||
@abstract As originally reported in rdar://14729288, when scrollEnabled = NO,
|
||||
UITextView does not calculate its contentSize. This makes it difficult
|
||||
for a client to embed a UITextView inside a different scroll view with
|
||||
other content (setting scrollEnabled = NO on the UITextView itself,
|
||||
because the containing scroll view will handle the gesture)...
|
||||
because accessing contentSize is typically necessary to perform layout.
|
||||
Apple later closed the issue as expected behavior. This works around
|
||||
the issue by ensuring that contentSize is always calculated, while
|
||||
still providing control over the UITextView's scrolling.
|
||||
|
||||
See issue: https://github.com/facebook/AsyncDisplayKit/issues/1063
|
||||
*/
|
||||
@interface ASPanningOverriddenUITextView : UITextView
|
||||
{
|
||||
BOOL _shouldBlockPanGesture;
|
||||
|
||||
Reference in New Issue
Block a user