mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-17 09:10:30 +00:00
Add backgroundView for ASCellNode #trivial (#1333)
This commit is contained in:
parent
2a1e03fe75
commit
8908030eeb
@ -194,6 +194,12 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
|
||||
*/
|
||||
@property (nullable) UIView *selectedBackgroundView;
|
||||
|
||||
/* @abstract The view used as the background of the cell.
|
||||
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
|
||||
* ASCollectionView uses these properties when configuring UICollectionViewCells that host ASCellNodes.
|
||||
*/
|
||||
@property (nullable) UIView *backgroundView;
|
||||
|
||||
/* @abstract The accessory type view on the right side of the cell. Please take care of your ASLayoutSpec so that doesn't overlay the accessoryView
|
||||
* @default UITableViewCellAccessoryNone
|
||||
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
|
||||
|
@ -1229,6 +1229,7 @@ static NSString * const kReuseIdentifier = @"_ASCollectionReuseIdentifier";
|
||||
// Update the selected background view in collectionView:willDisplayCell:forItemAtIndexPath: otherwise it could be too
|
||||
// early e.g. if the selectedBackgroundView was set in didLoad()
|
||||
cell.selectedBackgroundView = cellNode.selectedBackgroundView;
|
||||
cell.backgroundView = cellNode.backgroundView;
|
||||
|
||||
// Under iOS 10+, cells may be removed/re-added to the collection view without
|
||||
// receiving prepareForReuse/applyLayoutAttributes, as an optimization for e.g.
|
||||
|
@ -109,6 +109,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
if (node) {
|
||||
self.backgroundColor = node.backgroundColor;
|
||||
self.selectedBackgroundView = node.selectedBackgroundView;
|
||||
self.backgroundView = node.backgroundView;
|
||||
#if TARGET_OS_IOS
|
||||
self.separatorInset = node.separatorInset;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user