Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 89f4653

Browse files
committed
Merge pull request #1696 from maicki/FixImageNodeOpaqueBackground
[ASImageNode] Fix image sometimes appearing with black background or completely disappearing in ASImageNode
2 parents a7c1ecb + 73ce8c1 commit 89f4653

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

AsyncDisplayKit/ASImageNode.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ - (instancetype)init
9494
self.contentsScale = ASScreenScale();
9595
self.contentMode = UIViewContentModeScaleAspectFill;
9696
self.opaque = NO;
97+
98+
// If no backgroundColor is set to the image node and it's a subview of UITableViewCell, UITableView is setting
99+
// the opaque value of all subviews to YES if highlighting / selection is happening and does not set it back to the
100+
// initial value. With setting a explicit backgroundColor we can prevent that change.
101+
self.backgroundColor = [UIColor clearColor];
97102

98103
_cropEnabled = YES;
99104
_forceUpscaling = NO;

0 commit comments

Comments
 (0)