diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index ae061eb6ca..c8523125ad 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -43,6 +43,16 @@ //@property (atomic, retain) UIColor *backgroundColor; @property (nonatomic) UITableViewCellSelectionStyle selectionStyle; +/* + * A Boolean value that indicates whether the node is selected. + */ +@property (nonatomic, assign) BOOL selected; + +/* + * A Boolean value that indicates whether the node is highlighted. + */ +@property (nonatomic, assign) BOOL highlighted; + /* * ASCellNode must forward touch events in order for UITableView and UICollectionView tap handling to work. Overriding * these methods (e.g. for highlighting) requires the super method be called. diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 7c36c775a6..a232007c3e 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -135,6 +135,15 @@ static BOOL _isInterceptedSelector(SEL sel) [super didTransitionToState:state]; } +- (void)setSelected:(BOOL)selected +{ + _node.selected = selected; +} + +- (void)setHighlighted:(BOOL)highlighted { + _node.highlighted = highlighted; +} + @end