Cell selection not visible after setting ASCellNode backgroundColor on iOS 13 or later
Problem Statement
I created a sample project for this bug. UIKit and Texture behaviors can be compared side by side.

When setting backgroundColor of ASCellNode, Texture has been setting backgroundColor on both _ASDisplayView (added on top of contentView) and underlying _ASTableViewCell.

This bug happens on iOS 13 or later, which may result from UIKit behavior change.
Prior to iOS 13, UIKit would make _ASDisplayView transparent when cell is selected. This behavior no longer works on iOS 13 or later, which results in opaque _ASDisplayView blocking selection color below (UITableViewCellSelectedBackground).
Discussion for Possible Solutions
-
In some example projects,
[self updateBackgroundColor]was used insetSelected:ofASCellNode. If this is the suggested way going forward, it should be better documented. -
We may have a workaround by assigning
cellNode.backgroundColorinnodeBlockForRowAt, and then settingcellNode.backgroundColor = nilinwillDisplayRowWith. Not a good solution. -
In Texture, we may set
node.backgroundColor = nilright afterself.backgroundColor = node.backgroundColor;(backgroundColorhas been passed to underlying_ASTableViewCell). However, this may only work whennode.backgroundis set insideASCellNodeBlock. -
In Texture, we may create another UITableViewCell specific passthrough property "
backgroundColor" onASCellNode, sobackgroundColorwould not go up to superclassASDisplayNodeand thus_ASDisplayView. However,ASCellNodedoes not passbackgroundColorto underlying_ASCollectionViewCellfor other reasons, which will cause other issues.
Any other ideas?