Skip to content

Commit

Permalink
Expose asyncdisplaykit_node in _ASDisplayView same as in _ASDisplayLa…
Browse files Browse the repository at this point in the history
…yer #trivial (TextureGroup#773)

* Expose asyncdisplaykit_node in _ASDisplayView same as in _ASDisplayLayer

* Change comment
  • Loading branch information
maicki authored and bernieperez committed Apr 25, 2018
1 parent 4542fcf commit 5fcafbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Source/Details/_ASDisplayView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@
// This class is only for use by ASDisplayNode and should never be subclassed or used directly.
// Note that the "node" property is added to UIView directly via a category in ASDisplayNode.

@class ASDisplayNode;

@interface _ASDisplayView : UIView

/**
@discussion This property overrides the UIView category method which implements this via associated objects.
This should result in much better performance for _ASDisplayView.
*/
@property (nonatomic, weak) ASDisplayNode *asyncdisplaykit_node;

// These methods expose a way for ASDisplayNode touch events to let the view call super touch events
// Some UIKit mechanisms, like UITableView and UICollectionView selection handling, require this to work
- (void)__forwardTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
Expand Down
1 change: 0 additions & 1 deletion Source/Details/_ASDisplayView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#import <AsyncDisplayKit/ASLayout.h>

@interface _ASDisplayView ()
@property (nullable, atomic, weak, readwrite) ASDisplayNode *asyncdisplaykit_node;

// Keep the node alive while its view is active. If you create a view, add its layer to a layer hierarchy, then release
// the view, the layer retains the view to prevent a crash. This replicates this behaviour for the node abstraction.
Expand Down

0 comments on commit 5fcafbc

Please sign in to comment.