mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Support background colour and selection style on ASCellNodes.
Most UITableViewCell properties aren't useful in conjunction with ASCellNode -- the system's UIView properties are unsupported for performance reasons, and properties that configure them (e.g., content indentation) don't affect custom node hierarchies. This patch adds support to _ASTableViewCell for the properties that *are* useful. r=scottg
This commit is contained in:
@@ -351,6 +351,15 @@ static BOOL ASRangeIsValid(NSRange range)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)configureTableViewCell:(UITableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[self configureContentView:cell.contentView forIndexPath:indexPath];
|
||||
|
||||
ASCellNode *node = [self sizedNodeForIndexPath:indexPath];
|
||||
cell.backgroundColor = node.backgroundColor;
|
||||
cell.selectionStyle = node.selectionStyle;
|
||||
}
|
||||
|
||||
- (void)configureContentView:(UIView *)contentView forIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
ASCellNode *newNode = [self sizedNodeForIndexPath:indexPath];
|
||||
|
||||
Reference in New Issue
Block a user