Rename ASCellNode delegate to layoutDelegate to avoid common naming overlap

This commit is contained in:
Scott Goodson
2015-11-01 12:51:46 -08:00
parent 0598935957
commit e517f88e65
4 changed files with 8 additions and 8 deletions

View File

@@ -12,7 +12,7 @@
typedef NSUInteger ASCellNodeAnimation;
@protocol ASCellNodeDelegate <NSObject>
@protocol ASCellNodeLayoutDelegate <NSObject>
/**
* Notifies the delegate that the specified cell node has done a relayout.
@@ -72,7 +72,7 @@ typedef NSUInteger ASCellNodeAnimation;
/*
* A delegate to be notified (on main thread) after a relayout.
*/
@property (nonatomic, weak) id<ASCellNodeDelegate> delegate;
@property (nonatomic, weak) id<ASCellNodeLayoutDelegate> layoutDelegate;
/*
* A constant that is passed to the delegate to indicate how a relayout is to be animated.

View File

@@ -56,9 +56,9 @@
ASDisplayNodeAssertThreadAffinity(self);
[super setNeedsLayout];
if (_delegate != nil) {
if (_layoutDelegate != nil) {
ASPerformBlockOnMainThread(^{
[_delegate node:self didRelayoutWithSuggestedAnimation:_relayoutAnimation];
[_layoutDelegate node:self didRelayoutWithSuggestedAnimation:_relayoutAnimation];
});
}
}

View File

@@ -130,7 +130,7 @@ static BOOL _isInterceptedSelector(SEL sel)
#pragma mark -
#pragma mark ASCollectionView.
@interface ASCollectionView () <ASRangeControllerDelegate, ASDataControllerSource, ASCellNodeDelegate> {
@interface ASCollectionView () <ASRangeControllerDelegate, ASDataControllerSource, ASCellNodeLayoutDelegate> {
_ASCollectionViewProxy *_proxyDataSource;
_ASCollectionViewProxy *_proxyDelegate;
@@ -655,7 +655,7 @@ static BOOL _isInterceptedSelector(SEL sel)
{
ASCellNode *node = [_asyncDataSource collectionView:self nodeForItemAtIndexPath:indexPath];
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
node.delegate = self;
node.layoutDelegate = self;
return node;
}

View File

@@ -151,7 +151,7 @@ static BOOL _isInterceptedSelector(SEL sel)
#pragma mark -
#pragma mark ASTableView
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource, _ASTableViewCellDelegate, ASCellNodeDelegate> {
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource, _ASTableViewCellDelegate, ASCellNodeLayoutDelegate> {
_ASTableViewProxy *_proxyDataSource;
_ASTableViewProxy *_proxyDelegate;
@@ -820,7 +820,7 @@ static BOOL _isInterceptedSelector(SEL sel)
{
ASCellNode *node = [_asyncDataSource tableView:self nodeForRowAtIndexPath:indexPath];
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
node.delegate = self;
node.layoutDelegate = self;
return node;
}