Fix background color issue

This commit is contained in:
Adlai Holler
2016-02-17 13:40:00 -08:00
parent a3a38b4b5e
commit b0cbd2dd59

View File

@@ -540,15 +540,10 @@ if (shouldApply) { _layer.layerProperty = (layerValueExpr); } else { _pendingVie
- (void)setBackgroundColor:(UIColor *)newBackgroundColor
{
UIColor *prevBackgroundColor = self.backgroundColor;
_bridge_prologue_write;
_setToLayer(backgroundColor, newBackgroundColor.CGColor);
// Note: This check assumes that the colors are within the same color space.
if (!ASObjectIsEqual(prevBackgroundColor, newBackgroundColor)) {
[self setNeedsDisplay];
}
// FIXME: Would like to setNeedsDisplay if background color changed, but
// not safe to read old color in background.
}
- (UIColor *)tintColor