diff --git a/AsyncDisplayKit-Prefix.gcda b/AsyncDisplayKit-Prefix.gcda deleted file mode 100644 index 83c74d3faa..0000000000 Binary files a/AsyncDisplayKit-Prefix.gcda and /dev/null differ diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 1cc2d937cf..3a920cc5b5 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -1934,7 +1934,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -1955,7 +1955,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; INFOPLIST_FILE = AsyncDisplayKitTestHost/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -2043,7 +2043,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DSTROOT = /tmp/AsyncDisplayKit.dst; GCC_INPUT_FILETYPE = automatic; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch"; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -2062,7 +2062,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DSTROOT = /tmp/AsyncDisplayKit.dst; GCC_INPUT_FILETYPE = automatic; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch"; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -2085,7 +2085,7 @@ "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -2113,7 +2113,7 @@ "$(inherited)", "$(DEVELOPER_FRAMEWORKS_DIR)", ); - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -2142,7 +2142,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -2175,7 +2175,7 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO; + GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "$(SRCROOT)/AsyncDisplayKit-iOS/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/AsyncDisplayKit/ASDisplayNode.h b/AsyncDisplayKit/ASDisplayNode.h index cad8539ac8..84d29f0f81 100644 --- a/AsyncDisplayKit/ASDisplayNode.h +++ b/AsyncDisplayKit/ASDisplayNode.h @@ -15,8 +15,6 @@ #import #import -NS_ASSUME_NONNULL_BEGIN - @class ASDisplayNode; /** @@ -37,7 +35,7 @@ typedef CALayer * _Nonnull(^ASDisplayNodeLayerBlock)(); /** * ASDisplayNode loaded callback block. This block is called BEFORE the -didLoad method and is always called on the main thread. */ -typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode *node); +typedef void (^ASDisplayNodeDidLoadBlock)(ASDisplayNode * _Nonnull node); /** Interface state is available on ASDisplayNode and ASViewController, and @@ -86,6 +84,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) * */ +NS_ASSUME_NONNULL_BEGIN @interface ASDisplayNode : ASDealloc2MainObject @@ -195,7 +194,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) * @warning The first access to it must be on the main thread, and should only be used on the main thread thereafter as * well. */ -@property (nonatomic, readonly, retain) CALayer *layer; +@property (nonatomic, readonly, retain) CALayer * _Nonnull layer; /** * @abstract Returns the Interface State of the node. @@ -568,7 +567,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) @end - +NS_ASSUME_NONNULL_END /** * ## UIView bridge * @@ -599,7 +598,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) */ - (void)setNeedsLayout; -@property (atomic, retain) id contents; // default=nil +@property (atomic, retain, nullable) id contents; // default=nil @property (atomic, assign) BOOL clipsToBounds; // default==NO @property (atomic, getter=isOpaque) BOOL opaque; // default==YES @@ -644,12 +643,12 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) @property (atomic, assign, getter=isUserInteractionEnabled) BOOL userInteractionEnabled; // default=YES (NO for layer-backed nodes) @property (atomic, assign, getter=isExclusiveTouch) BOOL exclusiveTouch; // default=NO -@property (atomic, assign) CGColorRef shadowColor; // default=opaque rgb black +@property (atomic, assign, nullable) CGColorRef shadowColor; // default=opaque rgb black @property (atomic, assign) CGFloat shadowOpacity; // default=0.0 @property (atomic, assign) CGSize shadowOffset; // default=(0, -3) @property (atomic, assign) CGFloat shadowRadius; // default=3 @property (atomic, assign) CGFloat borderWidth; // default=0 -@property (atomic, assign) CGColorRef borderColor; // default=opaque rgb black +@property (atomic, assign, nullable) CGColorRef borderColor; // default=opaque rgb black // UIResponder methods // By default these fall through to the underlying view, but can be overridden. @@ -658,7 +657,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) - (BOOL)canResignFirstResponder; // default==YES - (BOOL)resignFirstResponder; // default==NO (no-op) - (BOOL)isFirstResponder; -- (BOOL)canPerformAction:(SEL)action withSender:(id)sender; +- (BOOL)canPerformAction:(nonnull SEL)action withSender:(nonnull id)sender; // Accessibility support @property (atomic, assign) BOOL isAccessibilityElement; @@ -691,7 +690,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) * * @param node The node to be added. */ -- (void)addSubnode:(ASDisplayNode *)node; +- (void)addSubnode:(nonnull ASDisplayNode *)node; @end /** CALayer(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to a CALayer. */ @@ -701,7 +700,7 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) * * @param node The node to be added. */ -- (void)addSubnode:(ASDisplayNode *)node; +- (void)addSubnode:(nonnull ASDisplayNode *)node; @end @@ -712,5 +711,3 @@ typedef NS_OPTIONS(NSUInteger, ASInterfaceState) @property (nonatomic, assign) BOOL placeholderFadesOut ASDISPLAYNODE_DEPRECATED; @end - -NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index fff4a6d85b..983bfcd641 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly, strong) UITextView *textView; //! @abstract The attributes to apply to new text being entered by the user. -@property (nonatomic, readwrite, strong) NSDictionary *typingAttributes; +@property (nonatomic, readwrite, strong, nullable) NSDictionary *typingAttributes; //! @abstract The range of text currently selected. If length is zero, the range is the cursor location. @property (nonatomic, readwrite, assign) NSRange selectedRange; @@ -47,14 +47,14 @@ NS_ASSUME_NONNULL_BEGIN @abstract The styled placeholder text displayed by the text node while no text is entered @discussion The placeholder is displayed when the user has not entered any text and the keyboard is not visible. */ -@property (nonatomic, readwrite, strong) NSAttributedString *attributedPlaceholderText; +@property (nonatomic, readwrite, strong, nullable) NSAttributedString *attributedPlaceholderText; #pragma mark - Modifying User Text /** @abstract The styled text displayed by the receiver. @discussion When the placeholder is displayed (as indicated by -isDisplayingPlaceholder), this value is nil. Otherwise, this value is the attributed text the user has entered. This value can be modified regardless of whether the receiver is the first responder (and thus, editing) or not. Changing this value from nil to non-nil will result in the placeholder being hidden, and the new value being displayed. */ -@property (nonatomic, readwrite, copy) NSAttributedString *attributedText; +@property (nonatomic, readwrite, copy, nullable) NSAttributedString *attributedText; #pragma mark - Managing The Keyboard //! @abstract The text input mode used by the receiver's keyboard, if it is visible. This value is undefined if the receiver is not the first responder. diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index aa774b5b41..bcc98f4768 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -17,6 +17,7 @@ #import "ASMultidimensionalArrayUtils.h" #import "ASInternalHelpers.h" #import "ASLayout.h" +#import "ASFlowLayoutController.h" //#define LOG(...) NSLog(__VA_ARGS__) #define LOG(...)