[ASCellNode] Fix selection / highlight implementation

This commit is contained in:
Hannah Trosi
2016-06-25 00:22:28 -07:00
parent 42a1227d69
commit 2e4b1ea053
6 changed files with 216 additions and 37 deletions

View File

@@ -81,14 +81,16 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
@property (nonatomic) UITableViewCellSelectionStyle selectionStyle;
/**
* A Boolean value that indicates whether the node is selected.
* A Boolean value that is synchronized with the underlying collection or tableView cell property.
* Setting this value is equivalent to calling selectItem / deselectItem on the collection or table.
*/
@property (nonatomic, assign) BOOL selected;
@property (nonatomic, assign, getter=isSelected) BOOL selected;
/**
* A Boolean value that indicates whether the node is highlighted.
* A Boolean value that is synchronized with the underlying collection or tableView cell property.
* Setting this value is equivalent to calling highlightItem / unHighlightItem on the collection or table.
*/
@property (nonatomic, assign) BOOL highlighted;
@property (nonatomic, assign, getter=isHighlighted) BOOL highlighted;
/*
* ASCellNode must forward touch events in order for UITableView and UICollectionView tap handling to work. Overriding
@@ -148,6 +150,9 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
*/
@property (nonatomic, assign) UIEdgeInsets textInsets;
- (BOOL)selected ASDISPLAYNODE_DEPRECATED;
- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED;
@end
NS_ASSUME_NONNULL_END