Merge pull request #1696 from maicki/FixImageNodeOpaqueBackground

[ASImageNode] Fix image sometimes appearing with black background or completely disappearing in ASImageNode
This commit is contained in:
appleguy
2016-05-28 22:56:16 +07:00

View File

@@ -94,6 +94,11 @@
self.contentsScale = ASScreenScale();
self.contentMode = UIViewContentModeScaleAspectFill;
self.opaque = NO;
// If no backgroundColor is set to the image node and it's a subview of UITableViewCell, UITableView is setting
// the opaque value of all subviews to YES if highlighting / selection is happening and does not set it back to the
// initial value. With setting a explicit backgroundColor we can prevent that change.
self.backgroundColor = [UIColor clearColor];
_cropEnabled = YES;
_forceUpscaling = NO;