From e517f88e65debe63a059a9bac5e5fa8897ad171a Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sun, 1 Nov 2015 12:51:46 -0800 Subject: [PATCH] Rename ASCellNode delegate to layoutDelegate to avoid common naming overlap --- AsyncDisplayKit/ASCellNode.h | 4 ++-- AsyncDisplayKit/ASCellNode.m | 4 ++-- AsyncDisplayKit/ASCollectionView.mm | 4 ++-- AsyncDisplayKit/ASTableView.mm | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 7d3bdfd583..a9c63b5827 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -12,7 +12,7 @@ typedef NSUInteger ASCellNodeAnimation; -@protocol ASCellNodeDelegate +@protocol ASCellNodeLayoutDelegate /** * 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 delegate; +@property (nonatomic, weak) id layoutDelegate; /* * A constant that is passed to the delegate to indicate how a relayout is to be animated. diff --git a/AsyncDisplayKit/ASCellNode.m b/AsyncDisplayKit/ASCellNode.m index 37df35e864..a56e9f3501 100644 --- a/AsyncDisplayKit/ASCellNode.m +++ b/AsyncDisplayKit/ASCellNode.m @@ -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]; }); } } diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 7c5c667f2f..f7516a264a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -130,7 +130,7 @@ static BOOL _isInterceptedSelector(SEL sel) #pragma mark - #pragma mark ASCollectionView. -@interface ASCollectionView () { +@interface ASCollectionView () { _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; } diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index fa52ed0030..e8be092d97 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -151,7 +151,7 @@ static BOOL _isInterceptedSelector(SEL sel) #pragma mark - #pragma mark ASTableView -@interface ASTableView () { +@interface ASTableView () { _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; }