Clean up actionForLayer:forKey: (#3063)

This commit is contained in:
Adlai Holler 2017-02-23 11:32:01 -08:00 committed by GitHub
parent 6a9781f64c
commit 1d21c0bd55

View File

@ -2245,7 +2245,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority";
#pragma mark <CALayerDelegate>
// We are only the delegate for the layer when we are layer-backed, as UIView performs this funcition normally
// We are only the delegate for the layer when we are layer-backed, as UIView performs this function normally
- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event
{
if (event == kCAOnOrderIn) {
@ -2254,8 +2254,8 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority";
[self __exitHierarchy];
}
ASDisplayNodeAssert(_flags.layerBacked, @"We shouldn't get called back here if there is no layer");
return (id)kCFNull;
ASDisplayNodeAssert(_flags.layerBacked, @"We shouldn't get called back here unless we are layer-backed.");
return nil;
}
#pragma mark - Error Handling