no message

This commit is contained in:
Peter 2017-06-16 12:16:42 +03:00
parent baf94a7575
commit dd3d6bbeec
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0820" LastUpgradeVersion = "0900"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

View File

@ -586,11 +586,11 @@ if (shouldApply) { _layer.layerProperty = (layerValueExpr); } else { ASDisplayNo
{ {
_bridge_prologue_write; _bridge_prologue_write;
CGColorRef newBackgroundCGColor = [newBackgroundColor CGColor]; CGColorRef newBackgroundCGColor = CGColorRetain([newBackgroundColor CGColor]);
BOOL shouldApply = ASDisplayNodeShouldApplyBridgedWriteToView(self); BOOL shouldApply = ASDisplayNodeShouldApplyBridgedWriteToView(self);
if (shouldApply) { if (shouldApply) {
CGColorRef oldBackgroundCGColor = _layer.backgroundColor; CGColorRef oldBackgroundCGColor = CGColorRetain(_layer.backgroundColor);
BOOL specialPropertiesHandling = ASDisplayNodeNeedsSpecialPropertiesHandlingForFlags(_flags); BOOL specialPropertiesHandling = ASDisplayNodeNeedsSpecialPropertiesHandlingForFlags(_flags);
if (specialPropertiesHandling) { if (specialPropertiesHandling) {
@ -602,12 +602,15 @@ if (shouldApply) { _layer.layerProperty = (layerValueExpr); } else { ASDisplayNo
if (!CGColorEqualToColor(oldBackgroundCGColor, newBackgroundCGColor)) { if (!CGColorEqualToColor(oldBackgroundCGColor, newBackgroundCGColor)) {
[self setNeedsDisplay]; [self setNeedsDisplay];
} }
CGColorRelease(oldBackgroundCGColor);
} else { } else {
// NOTE: If we're in the background, we cannot read the current value of bgcolor (if loaded). // NOTE: If we're in the background, we cannot read the current value of bgcolor (if loaded).
// When the pending state is applied to the view on main, we will call `setNeedsDisplay` if // When the pending state is applied to the view on main, we will call `setNeedsDisplay` if
// the new background color doesn't match the one on the layer. // the new background color doesn't match the one on the layer.
ASDisplayNodeGetPendingState(self).backgroundColor = newBackgroundCGColor; ASDisplayNodeGetPendingState(self).backgroundColor = newBackgroundCGColor;
} }
CGColorRelease(newBackgroundCGColor);
} }
- (UIColor *)tintColor - (UIColor *)tintColor