mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASCellNode] Added indexPath property. (#2468)
* [ASCellNode] Added indexPath property. * [ASCellNode] Cached the type of scrollView we're using in the node, and placed that logic in setScrollView. * [ASCellNode] Removed table and collection view from indexPath, since they return the index paths from the view-space. * Changed the logic for getting indexPath so that it works even when the cell is not displayed. * [VerticalWithinHorizontalScrolling] Explicitally synthesized indexPath property.
This commit is contained in:
@@ -108,6 +108,20 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
|
||||
*/
|
||||
@property (nonatomic, assign, getter=isHighlighted) BOOL highlighted;
|
||||
|
||||
/**
|
||||
* The current index path of this cell node, or @c nil if this node is
|
||||
* not a valid item inside a table node or collection node.
|
||||
*
|
||||
* @note This property must be accessed on the main thread.
|
||||
*/
|
||||
@property (nonatomic, readonly, nullable) NSIndexPath *indexPath;
|
||||
|
||||
/**
|
||||
* The owning node (ASCollectionNode/ASTableNode) of this cell node, or @c nil if this node is
|
||||
* not a valid item inside a table node or collection node or if those nodes are nil.
|
||||
*/
|
||||
@property (weak, nonatomic, readonly, nullable) ASDisplayNode *owningNode;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
Reference in New Issue
Block a user