Add missing nullability annotations to headers related to display node transitions (#1688)

This commit is contained in:
Eric Jensen 2016-05-20 20:10:07 -07:00 committed by appleguy
parent 94b88ad1ab
commit d3c33a38bb
2 changed files with 14 additions and 6 deletions

View File

@ -8,6 +8,8 @@
#import <AsyncDisplayKit/ASDisplayNode.h> #import <AsyncDisplayKit/ASDisplayNode.h>
NS_ASSUME_NONNULL_BEGIN
extern NSString * const ASTransitionContextFromLayoutKey; extern NSString * const ASTransitionContextFromLayoutKey;
extern NSString * const ASTransitionContextToLayoutKey; extern NSString * const ASTransitionContextToLayoutKey;
@ -21,7 +23,7 @@ extern NSString * const ASTransitionContextToLayoutKey;
/** /**
* @abstract Retrieve either the "from" or "to" layout * @abstract Retrieve either the "from" or "to" layout
*/ */
- (ASLayout *)layoutForKey:(NSString *)key; - (nullable ASLayout *)layoutForKey:(NSString *)key;
/** /**
* @abstract Retrieve either the "from" or "to" constrainedSize * @abstract Retrieve either the "from" or "to" constrainedSize
@ -62,3 +64,5 @@ extern NSString * const ASTransitionContextToLayoutKey;
- (void)completeTransition:(BOOL)didComplete; - (void)completeTransition:(BOOL)didComplete;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,8 @@
#import "ASContextTransitioning.h" #import "ASContextTransitioning.h"
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
void ASPerformBlockOnMainThread(void (^block)()); void ASPerformBlockOnMainThread(void (^block)());
void ASPerformBlockOnBackgroundThread(void (^block)()); // DISPATCH_QUEUE_PRIORITY_DEFAULT void ASPerformBlockOnBackgroundThread(void (^block)()); // DISPATCH_QUEUE_PRIORITY_DEFAULT
@ -35,12 +37,12 @@ ASDISPLAYNODE_EXTERN_C_END
* restoring context if necessary. Restoring can be done in contextDidDisplayNodeContent * restoring context if necessary. Restoring can be done in contextDidDisplayNodeContent
* This block can be called from *any* thread and it is unsafe to access any UIKit main thread properties from it. * This block can be called from *any* thread and it is unsafe to access any UIKit main thread properties from it.
*/ */
@property (nonatomic, strong) ASDisplayNodeContextModifier willDisplayNodeContentWithRenderingContext; @property (nonatomic, copy, nullable) ASDisplayNodeContextModifier willDisplayNodeContentWithRenderingContext;
/** /**
* @abstract allow modification of a context after the node's content is drawn * @abstract allow modification of a context after the node's content is drawn
*/ */
@property (nonatomic, strong) ASDisplayNodeContextModifier didDisplayNodeContentWithRenderingContext; @property (nonatomic, copy, nullable) ASDisplayNodeContextModifier didDisplayNodeContentWithRenderingContext;
/** @name Layout Transitioning */ /** @name Layout Transitioning */
@ -73,7 +75,7 @@ ASDISPLAYNODE_EXTERN_C_END
- (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize - (void)transitionLayoutWithSizeRange:(ASSizeRange)constrainedSize
animated:(BOOL)animated animated:(BOOL)animated
shouldMeasureAsync:(BOOL)shouldMeasureAsync shouldMeasureAsync:(BOOL)shouldMeasureAsync
measurementCompletion:(void(^)())completion; measurementCompletion:(nullable void(^)())completion;
/** /**
* @abstract Invalidates the current layout and begins a relayout of the node with the current `constrainedSize`. Must be called on main thread. * @abstract Invalidates the current layout and begins a relayout of the node with the current `constrainedSize`. Must be called on main thread.
@ -88,8 +90,8 @@ ASDISPLAYNODE_EXTERN_C_END
* @see animateLayoutTransition: * @see animateLayoutTransition:
*/ */
- (void)transitionLayoutWithAnimation:(BOOL)animated - (void)transitionLayoutWithAnimation:(BOOL)animated
shouldMeasureAsync:(BOOL)shouldMeasureAsync shouldMeasureAsync:(BOOL)shouldMeasureAsync
measurementCompletion:(void(^)())completion; measurementCompletion:(nullable void(^)())completion;
/** /**
@ -113,3 +115,5 @@ ASDISPLAYNODE_EXTERN_C_END
- (void)hierarchyDisplayDidFinish; - (void)hierarchyDisplayDidFinish;
@end @end
NS_ASSUME_NONNULL_END