Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit e5b2b56

Browse files
committed
Merge pull request #1084 from lkzhao/master
Update comments for ASPanningOverriddenUITextView
2 parents 992cc9f + 882379a commit e5b2b56

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

AsyncDisplayKit/ASEditableTextNode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
2525

2626
/**
2727
@abstract Enable scrolling on the textView
28+
@default true
2829
*/
2930
@property (nonatomic) BOOL scrollEnabled;
3031

AsyncDisplayKit/ASEditableTextNode.mm

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,19 @@
1616
#import "ASTextNodeWordKerner.h"
1717
#import "ASThread.h"
1818

19-
//! @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.
20-
//! See issue: https://github.com/facebook/AsyncDisplayKit/issues/1063
19+
/**
20+
@abstract As originally reported in rdar://14729288, when scrollEnabled = NO,
21+
UITextView does not calculate its contentSize. This makes it difficult
22+
for a client to embed a UITextView inside a different scroll view with
23+
other content (setting scrollEnabled = NO on the UITextView itself,
24+
because the containing scroll view will handle the gesture)...
25+
because accessing contentSize is typically necessary to perform layout.
26+
Apple later closed the issue as expected behavior. This works around
27+
the issue by ensuring that contentSize is always calculated, while
28+
still providing control over the UITextView's scrolling.
29+
30+
See issue: https://github.com/facebook/AsyncDisplayKit/issues/1063
31+
*/
2132
@interface ASPanningOverriddenUITextView : UITextView
2233
{
2334
BOOL _shouldBlockPanGesture;

0 commit comments

Comments
 (0)