Merge pull request #1867 from maicki/MSFixXcode8Errors

Fix Xcode 8 Errors
This commit is contained in:
Adlai Holler
2016-07-08 12:42:50 -07:00
committed by GitHub
3 changed files with 16 additions and 8 deletions

View File

@@ -39,6 +39,10 @@ NSInteger const ASDefaultDrawingPriority = ASDefaultTransactionPriority;
NSString * const ASRenderingEngineDidDisplayScheduledNodesNotification = @"ASRenderingEngineDidDisplayScheduledNodes";
NSString * const ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp = @"ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp";
// Forward declare CALayerDelegate protocol as the iOS 10 SDK moves CALayerDelegate from a formal delegate to a protocol.
// We have to forward declare the protocol as this place otherwise it will not compile compiling with an Base SDK < iOS 10
@protocol CALayerDelegate;
@interface ASDisplayNode () <UIGestureRecognizerDelegate, _ASDisplayLayerDelegate, _ASTransitionContextCompletionDelegate>
/**
@@ -493,7 +497,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
if (isLayerBacked) {
TIME_SCOPED(_debugTimeToCreateView);
_layer = [self _layerToLoad];
_layer.delegate = self;
// Surpress warning for Base SDK > 10.0
_layer.delegate = (id<CALayerDelegate>)self;
} else {
TIME_SCOPED(_debugTimeToCreateView);
_view = [self _viewToLoad];