1515#import < AsyncDisplayKit/ASAsciiArtBoxCreator.h>
1616#import < AsyncDisplayKit/ASLayoutable.h>
1717
18- NS_ASSUME_NONNULL_BEGIN
19-
2018@class ASDisplayNode;
2119
2220/* *
@@ -37,7 +35,7 @@ typedef CALayer * _Nonnull(^ASDisplayNodeLayerBlock)();
3735/* *
3836 * ASDisplayNode loaded callback block. This block is called BEFORE the -didLoad method and is always called on the main thread.
3937 */
40- typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node);
38+ typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode * _Nonnull node);
4139
4240/* *
4341 Interface state is available on ASDisplayNode and ASViewController, and
@@ -86,6 +84,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
8684 *
8785 */
8886
87+ NS_ASSUME_NONNULL_BEGIN
8988@interface ASDisplayNode : ASDealloc2MainObject <ASLayoutable>
9089
9190
@@ -195,7 +194,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
195194 * @warning The first access to it must be on the main thread, and should only be used on the main thread thereafter as
196195 * well.
197196 */
198- @property (nonatomic , readonly , retain ) CALayer *layer;
197+ @property (nonatomic , readonly , retain ) CALayer * _Nonnull layer;
199198
200199/* *
201200 * @abstract Returns the Interface State of the node.
@@ -568,7 +567,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
568567
569568@end
570569
571-
570+ NS_ASSUME_NONNULL_END
572571/* *
573572 * ## UIView bridge
574573 *
@@ -599,7 +598,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
599598 */
600599- (void )setNeedsLayout ;
601600
602- @property (atomic , retain ) id contents; // default=nil
601+ @property (atomic , retain , nullable ) id contents; // default=nil
603602@property (atomic , assign ) BOOL clipsToBounds; // default==NO
604603@property (atomic , getter =isOpaque) BOOL opaque; // default==YES
605604
@@ -644,12 +643,12 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
644643
645644@property (atomic , assign , getter =isUserInteractionEnabled) BOOL userInteractionEnabled; // default=YES (NO for layer-backed nodes)
646645@property (atomic , assign , getter =isExclusiveTouch) BOOL exclusiveTouch; // default=NO
647- @property (atomic , assign ) CGColorRef shadowColor; // default=opaque rgb black
646+ @property (atomic , assign , nullable ) CGColorRef shadowColor; // default=opaque rgb black
648647@property (atomic , assign ) CGFloat shadowOpacity; // default=0.0
649648@property (atomic , assign ) CGSize shadowOffset; // default=(0, -3)
650649@property (atomic , assign ) CGFloat shadowRadius; // default=3
651650@property (atomic , assign ) CGFloat borderWidth; // default=0
652- @property (atomic , assign ) CGColorRef borderColor; // default=opaque rgb black
651+ @property (atomic , assign , nullable ) CGColorRef borderColor; // default=opaque rgb black
653652
654653// UIResponder methods
655654// By default these fall through to the underlying view, but can be overridden.
@@ -658,7 +657,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
658657- (BOOL )canResignFirstResponder ; // default==YES
659658- (BOOL )resignFirstResponder ; // default==NO (no-op)
660659- (BOOL )isFirstResponder ;
661- - (BOOL )canPerformAction : (SEL )action withSender : (id )sender ;
660+ - (BOOL )canPerformAction : (nonnull SEL )action withSender : (nonnull id )sender ;
662661
663662// Accessibility support
664663@property (atomic , assign ) BOOL isAccessibilityElement;
@@ -691,7 +690,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
691690 *
692691 * @param node The node to be added.
693692 */
694- - (void )addSubnode : (ASDisplayNode *)node ;
693+ - (void )addSubnode : (nonnull ASDisplayNode *)node ;
695694@end
696695
697696/* * CALayer(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to a CALayer. */
@@ -701,7 +700,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
701700 *
702701 * @param node The node to be added.
703702 */
704- - (void )addSubnode : (ASDisplayNode *)node ;
703+ - (void )addSubnode : (nonnull ASDisplayNode *)node ;
705704@end
706705
707706
@@ -712,5 +711,3 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState)
712711@property (nonatomic , assign ) BOOL placeholderFadesOut ASDISPLAYNODE_DEPRECATED;
713712
714713@end
715-
716- NS_ASSUME_NONNULL_END
0 commit comments