Update all the files in the Details group

This commit is contained in:
Adlai Holler 2015-09-17 13:30:28 -07:00
parent 309ecca444
commit c010ddad3b
26 changed files with 146 additions and 51 deletions

View File

@ -9,6 +9,8 @@
#import <AsyncDisplayKit/ASLayoutController.h> #import <AsyncDisplayKit/ASLayoutController.h>
#import <AsyncDisplayKit/ASBaseDefines.h> #import <AsyncDisplayKit/ASBaseDefines.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASAbstractLayoutController : NSObject <ASLayoutController> @interface ASAbstractLayoutController : NSObject <ASLayoutController>
- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType; - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType;
@ -18,3 +20,5 @@
@property (nonatomic, assign) ASRangeTuningParameters tuningParameters ASDISPLAYNODE_DEPRECATED; @property (nonatomic, assign) ASRangeTuningParameters tuningParameters ASDISPLAYNODE_DEPRECATED;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <AsyncDisplayKit/ASImageProtocols.h> #import <AsyncDisplayKit/ASImageProtocols.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
* @abstract Simple NSURLSession-based image downloader. * @abstract Simple NSURLSession-based image downloader.
@ -15,3 +16,5 @@
@interface ASBasicImageDownloader : NSObject <ASImageDownloaderProtocol> @interface ASBasicImageDownloader : NSObject <ASImageDownloaderProtocol>
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,8 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
* @abstract A context object to notify when batch fetches are finished or cancelled. * @abstract A context object to notify when batch fetches are finished or cancelled.
*/ */
@ -58,3 +60,5 @@
- (void)beginBatchFetching; - (void)beginBatchFetching;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,8 @@
#import <AsyncDisplayKit/ASAbstractLayoutController.h> #import <AsyncDisplayKit/ASAbstractLayoutController.h>
#import <AsyncDisplayKit/ASBaseDefines.h> #import <AsyncDisplayKit/ASBaseDefines.h>
NS_ASSUME_NONNULL_BEGIN
@class ASCollectionView; @class ASCollectionView;
@interface ASCollectionViewLayoutController : ASAbstractLayoutController @interface ASCollectionViewLayoutController : ASAbstractLayoutController
@ -16,3 +18,5 @@
- (instancetype)initWithCollectionView:(ASCollectionView *)collectionView; - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -11,6 +11,8 @@
#import <AsyncDisplayKit/ASDimension.h> #import <AsyncDisplayKit/ASDimension.h>
#import "ASFlowLayoutController.h" #import "ASFlowLayoutController.h"
NS_ASSUME_NONNULL_BEGIN
@class ASCellNode; @class ASCellNode;
@class ASDataController; @class ASDataController;
@ -66,22 +68,22 @@ typedef NSUInteger ASDataControllerAnimationOptions;
Called for batch update. Called for batch update.
*/ */
- (void)dataControllerBeginUpdates:(ASDataController *)dataController; - (void)dataControllerBeginUpdates:(ASDataController *)dataController;
- (void)dataController:(ASDataController *)dataController endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion; - (void)dataController:(ASDataController *)dataController endUpdatesAnimated:(BOOL)animated completion:(void (^ _Nullable)(BOOL))completion;
/** /**
Called for insertion of elements. Called for insertion of elements.
*/ */
- (void)dataController:(ASDataController *)dataController didInsertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)dataController:(ASDataController *)dataController didInsertNodes:(NSArray<ASCellNode *> *)nodes atIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
Called for deletion of elements. Called for deletion of elements.
*/ */
- (void)dataController:(ASDataController *)dataController didDeleteNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)dataController:(ASDataController *)dataController didDeleteNodes:(NSArray<ASCellNode *> *)nodes atIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
Called for insertion of sections. Called for insertion of sections.
*/ */
- (void)dataController:(ASDataController *)dataController didInsertSections:(NSArray *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)dataController:(ASDataController *)dataController didInsertSections:(NSArray<NSArray<ASCellNode *> *> *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
Called for deletion of sections. Called for deletion of sections.
@ -139,7 +141,7 @@ typedef NSUInteger ASDataControllerAnimationOptions;
- (void)endUpdates; - (void)endUpdates;
- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion; - (void)endUpdatesAnimated:(BOOL)animated completion:(void (^ _Nullable)(BOOL))completion;
- (void)insertSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)insertSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
@ -149,11 +151,11 @@ typedef NSUInteger ASDataControllerAnimationOptions;
- (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)insertRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)deleteRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)reloadRowsAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
* Re-measures all loaded nodes. Used to respond to a change in size of the containing view * Re-measures all loaded nodes. Used to respond to a change in size of the containing view
@ -163,7 +165,7 @@ typedef NSUInteger ASDataControllerAnimationOptions;
- (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
- (void)reloadDataWithAnimationOptions:(ASDataControllerAnimationOptions)animationOptions completion:(void (^)())completion; - (void)reloadDataWithAnimationOptions:(ASDataControllerAnimationOptions)animationOptions completion:(void (^ _Nullable)())completion;
/** @name Data Querying */ /** @name Data Querying */
@ -171,10 +173,12 @@ typedef NSUInteger ASDataControllerAnimationOptions;
- (NSUInteger)numberOfRowsInSection:(NSUInteger)section; - (NSUInteger)numberOfRowsInSection:(NSUInteger)section;
- (ASCellNode *)nodeAtIndexPath:(NSIndexPath *)indexPath; - (nullable ASCellNode *)nodeAtIndexPath:(NSIndexPath *)indexPath;
- (NSArray *)nodesAtIndexPaths:(NSArray *)indexPaths; - (NSArray<ASCellNode *> *)nodesAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
- (NSArray *)completedNodes; // This provides efficient access to the entire _completedNodes multidimensional array. - (NSArray<NSArray <ASCellNode *> *> *)completedNodes; // This provides efficient access to the entire _completedNodes multidimensional array.
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
* _OBJC_SUPPORTED_INLINE_REFCNT_WITH_DEALLOC2MAIN permits classes to implement their own reference counting and enforce * _OBJC_SUPPORTED_INLINE_REFCNT_WITH_DEALLOC2MAIN permits classes to implement their own reference counting and enforce
@ -19,3 +20,5 @@
- (BOOL)_isDeallocating; - (BOOL)_isDeallocating;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,9 @@
#import <AsyncDisplayKit/ASAbstractLayoutController.h> #import <AsyncDisplayKit/ASAbstractLayoutController.h>
#import <AsyncDisplayKit/ASBaseDefines.h> #import <AsyncDisplayKit/ASBaseDefines.h>
NS_ASSUME_NONNULL_BEGIN
@class ASCellNode;
typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) { typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) {
ASFlowLayoutDirectionVertical, ASFlowLayoutDirectionVertical,
@ -17,7 +20,7 @@ typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) {
@protocol ASFlowLayoutControllerDataSource @protocol ASFlowLayoutControllerDataSource
- (NSArray *)completedNodes; // This provides access to ASDataController's _completedNodes multidimensional array. - (NSArray<NSArray <ASCellNode *> *> *)completedNodes; // This provides access to ASDataController's _completedNodes multidimensional array.
@end @end
@ -33,3 +36,5 @@ typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) {
- (instancetype)initWithScrollOption:(ASFlowLayoutDirection)layoutDirection; - (instancetype)initWithScrollOption:(ASFlowLayoutDirection)layoutDirection;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <QuartzCore/QuartzCore.h> #import <QuartzCore/QuartzCore.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASHighlightOverlayLayer : CALayer @interface ASHighlightOverlayLayer : CALayer
@ -19,16 +20,16 @@
@param rects Array containing CGRects wrapped in NSValue. @param rects Array containing CGRects wrapped in NSValue.
@param targetLayer The layer that the rects are relative to. The rects will be translated to the receiver's coordinate space when rendering. @param targetLayer The layer that the rects are relative to. The rects will be translated to the receiver's coordinate space when rendering.
*/ */
- (id)initWithRects:(NSArray *)rects targetLayer:(id)targetLayer; - (id)initWithRects:(NSArray<NSValue *> *)rects targetLayer:(nullable CALayer *)targetLayer;
/** /**
@summary Initializes with CGRects for the highlighting, in the receiver's coordinate space. @summary Initializes with CGRects for the highlighting, in the receiver's coordinate space.
@param rects Array containing CGRects wrapped in NSValue. @param rects Array containing CGRects wrapped in NSValue.
*/ */
- (id)initWithRects:(NSArray *)rects; - (id)initWithRects:(NSArray<NSValue *> *)rects;
@property (atomic, strong) __attribute__((NSObject)) CGColorRef highlightColor; @property (nullable, atomic, strong) __attribute__((NSObject)) CGColorRef highlightColor;
@property (atomic, weak) CALayer *targetLayer; @property (atomic, weak) CALayer *targetLayer;
@end @end
@ -42,3 +43,5 @@
@property (nonatomic, assign, setter=as_setAllowsHighlightDrawing:) BOOL as_allowsHighlightDrawing; @property (nonatomic, assign, setter=as_setAllowsHighlightDrawing:) BOOL as_allowsHighlightDrawing;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,7 @@
#import <CoreGraphics/CoreGraphics.h> #import <CoreGraphics/CoreGraphics.h>
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ASImageCacheProtocol <NSObject> @protocol ASImageCacheProtocol <NSObject>
@ -23,9 +24,9 @@
@discussion If `URL` is nil, `completion` will be invoked immediately with a nil image. This method should not block @discussion If `URL` is nil, `completion` will be invoked immediately with a nil image. This method should not block
the calling thread as it is likely to be called from the main thread. the calling thread as it is likely to be called from the main thread.
*/ */
- (void)fetchCachedImageWithURL:(NSURL *)URL - (void)fetchCachedImageWithURL:(nullable NSURL *)URL
callbackQueue:(dispatch_queue_t)callbackQueue callbackQueue:(nullable dispatch_queue_t)callbackQueue
completion:(void (^)(CGImageRef imageFromCache))completion; completion:(void (^)(CGImageRef _Nullable imageFromCache))completion;
@end @end
@ -48,10 +49,10 @@
@result An opaque identifier to be used in canceling the download, via `cancelImageDownloadForIdentifier:`. You must @result An opaque identifier to be used in canceling the download, via `cancelImageDownloadForIdentifier:`. You must
retain the identifier if you wish to use it later. retain the identifier if you wish to use it later.
*/ */
- (id)downloadImageWithURL:(NSURL *)URL - (id)downloadImageWithURL:(nullable NSURL *)URL
callbackQueue:(dispatch_queue_t)callbackQueue callbackQueue:(nullable dispatch_queue_t)callbackQueue
downloadProgressBlock:(void (^)(CGFloat progress))downloadProgressBlock downloadProgressBlock:(void (^ _Nullable)(CGFloat progress))downloadProgressBlock
completion:(void (^)(CGImageRef image, NSError *error))completion; completion:(void (^ _Nullable)(CGImageRef image, NSError *error))completion;
/** /**
@abstract Cancels an image download. @abstract Cancels an image download.
@ -59,6 +60,8 @@
`downloadImageWithURL:callbackQueue:downloadProgressBlock:completion:`. `downloadImageWithURL:callbackQueue:downloadProgressBlock:completion:`.
@discussion This method has no effect if `downloadIdentifier` is nil. @discussion This method has no effect if `downloadIdentifier` is nil.
*/ */
- (void)cancelImageDownloadForIdentifier:(id)downloadIdentifier; - (void)cancelImageDownloadForIdentifier:(nullable id)downloadIdentifier;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -19,8 +19,11 @@ typedef struct {
ASIndexPath end; ASIndexPath end;
} ASIndexPathRange; } ASIndexPathRange;
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
extern ASIndexPath ASIndexPathMake(NSInteger section, NSInteger row); extern ASIndexPath ASIndexPathMake(NSInteger section, NSInteger row);
extern BOOL ASIndexPathEqualToIndexPath(ASIndexPath first, ASIndexPath second); extern BOOL ASIndexPathEqualToIndexPath(ASIndexPath first, ASIndexPath second);
@ -41,3 +44,5 @@ ASDISPLAYNODE_EXTERN_C_END
- (ASIndexPath)ASIndexPathValue; - (ASIndexPath)ASIndexPathValue;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -12,6 +12,9 @@
#import <AsyncDisplayKit/ASLayoutRangeType.h> #import <AsyncDisplayKit/ASLayoutRangeType.h>
#import <AsyncDisplayKit/ASScrollDirection.h> #import <AsyncDisplayKit/ASScrollDirection.h>
NS_ASSUME_NONNULL_BEGIN
@class ASCellNode;
typedef struct { typedef struct {
CGFloat leadingBufferScreenfuls; CGFloat leadingBufferScreenfuls;
@ -27,26 +30,28 @@ typedef struct {
*/ */
- (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType; - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType;
- (BOOL)shouldUpdateForVisibleIndexPaths:(NSArray *)indexPaths viewportSize:(CGSize)viewportSize rangeType:(ASLayoutRangeType)rangeType; - (BOOL)shouldUpdateForVisibleIndexPaths:(NSArray<NSIndexPath *> *)indexPaths viewportSize:(CGSize)viewportSize rangeType:(ASLayoutRangeType)rangeType;
- (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection viewportSize:(CGSize)viewportSize rangeType:(ASLayoutRangeType)rangeType; - (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection viewportSize:(CGSize)viewportSize rangeType:(ASLayoutRangeType)rangeType;
@property (nonatomic, assign) ASRangeTuningParameters tuningParameters ASDISPLAYNODE_DEPRECATED; @property (nonatomic, assign) ASRangeTuningParameters tuningParameters ASDISPLAYNODE_DEPRECATED;
- (BOOL)shouldUpdateForVisibleIndexPath:(NSArray *)indexPath viewportSize:(CGSize)viewportSize ASDISPLAYNODE_DEPRECATED; - (BOOL)shouldUpdateForVisibleIndexPath:(NSIndexPath *)indexPath viewportSize:(CGSize)viewportSize ASDISPLAYNODE_DEPRECATED;
- (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection viewportSize:(CGSize)viewportSize ASDISPLAYNODE_DEPRECATED; - (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection viewportSize:(CGSize)viewportSize ASDISPLAYNODE_DEPRECATED;
@optional @optional
- (void)insertNodesAtIndexPaths:(NSArray *)indexPaths withSizes:(NSArray *)nodeSizes; - (void)insertNodesAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withSizes:(NSArray<NSValue *> *)nodeSizes;
- (void)deleteNodesAtIndexPaths:(NSArray *)indexPaths; - (void)deleteNodesAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
- (void)insertSections:(NSArray *)sections atIndexSet:(NSIndexSet *)indexSet; - (void)insertSections:(NSArray<NSArray <ASCellNode *>*> *)sections atIndexSet:(NSIndexSet *)indexSet;
- (void)deleteSectionsAtIndexSet:(NSIndexSet *)indexSet; - (void)deleteSectionsAtIndexSet:(NSIndexSet *)indexSet;
- (void)setVisibleNodeIndexPaths:(NSArray *)indexPaths; - (void)setVisibleNodeIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/* /*
* Use this class to compose new attributed strings. You may use the normal * Use this class to compose new attributed strings. You may use the normal
@ -38,14 +39,14 @@
*/ */
@interface ASMutableAttributedStringBuilder : NSMutableAttributedString @interface ASMutableAttributedStringBuilder : NSMutableAttributedString
- (instancetype)initWithString:(NSString *)str attributes:(NSDictionary *)attrs; - (instancetype)initWithString:(NSString *)str attributes:(nullable NSDictionary<NSString *, id> *)attrs;
- (instancetype)initWithAttributedString:(NSAttributedString *)attrStr; - (instancetype)initWithAttributedString:(NSAttributedString *)attrStr;
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str;
- (void)setAttributes:(NSDictionary *)attrs range:(NSRange)range; - (void)setAttributes:(nullable NSDictionary<NSString *, id> *)attrs range:(NSRange)range;
- (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range; - (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range;
- (void)addAttributes:(NSDictionary *)attrs range:(NSRange)range; - (void)addAttributes:(NSDictionary<NSString *, id> *)attrs range:(NSRange)range;
- (void)removeAttribute:(NSString *)name range:(NSRange)range; - (void)removeAttribute:(NSString *)name range:(NSRange)range;
- (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString; - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString;
@ -57,3 +58,5 @@
- (NSMutableAttributedString *)composedAttributedString; - (NSMutableAttributedString *)composedAttributedString;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -13,6 +13,7 @@
#import <AsyncDisplayKit/ASFlowLayoutController.h> #import <AsyncDisplayKit/ASFlowLayoutController.h>
#import <AsyncDisplayKit/ASLayoutController.h> #import <AsyncDisplayKit/ASLayoutController.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ASRangeControllerDelegate; @protocol ASRangeControllerDelegate;
@ -65,7 +66,7 @@
* *
* @returns an array of index paths corresponding to the nodes currently visible onscreen (i.e., the visible range). * @returns an array of index paths corresponding to the nodes currently visible onscreen (i.e., the visible range).
*/ */
- (NSArray *)rangeControllerVisibleNodeIndexPaths:(ASRangeController *)rangeController; - (NSArray<NSIndexPath *> *)rangeControllerVisibleNodeIndexPaths:(ASRangeController *)rangeController;
/** /**
* @param rangeController Sender. * @param rangeController Sender.
@ -88,7 +89,7 @@
* @param animated NO if all animations are disabled. YES otherwise. * @param animated NO if all animations are disabled. YES otherwise.
* @param completion Completion block. * @param completion Completion block.
*/ */
- (void)rangeController:(ASRangeController * )rangeController endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion; - (void)rangeController:(ASRangeController * )rangeController endUpdatesAnimated:(BOOL)animated completion:(void (^ _Nullable)(BOOL))completion;
/** /**
* Fetch nodes at specific index paths. * Fetch nodes at specific index paths.
@ -97,7 +98,7 @@
* *
* @param indexPaths Index paths. * @param indexPaths Index paths.
*/ */
- (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths; - (NSArray<ASCellNode *> *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray<NSIndexPath *> *)indexPaths;
/** /**
* Called for nodes insertion. * Called for nodes insertion.
@ -110,7 +111,7 @@
* *
* @param animationOptions Animation options. See ASDataControllerAnimationOptions. * @param animationOptions Animation options. See ASDataControllerAnimationOptions.
*/ */
- (void)rangeController:(ASRangeController *)rangeController didInsertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)rangeController:(ASRangeController *)rangeController didInsertNodes:(NSArray<ASCellNode *> *)nodes atIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
* Called for nodes deletion. * Called for nodes deletion.
@ -123,7 +124,7 @@
* *
* @param animationOptions Animation options. See ASDataControllerAnimationOptions. * @param animationOptions Animation options. See ASDataControllerAnimationOptions.
*/ */
- (void)rangeController:(ASRangeController *)rangeController didDeleteNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)rangeController:(ASRangeController *)rangeController didDeleteNodes:(NSArray<ASCellNode *> *)nodes atIndexPaths:(NSArray<NSIndexPath *> *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
/** /**
* Called for section insertion. * Called for section insertion.
@ -148,3 +149,5 @@
- (void)rangeController:(ASRangeController *)rangeController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; - (void)rangeController:(ASRangeController *)rangeController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -10,6 +10,8 @@
#import <AsyncDisplayKit/ASLayoutRangeType.h> #import <AsyncDisplayKit/ASLayoutRangeType.h>
NS_ASSUME_NONNULL_BEGIN
@class ASDisplayNode; @class ASDisplayNode;
@protocol ASRangeHandler <NSObject> @protocol ASRangeHandler <NSObject>
@ -20,3 +22,5 @@
- (void)node:(ASDisplayNode *)node exitedRangeOfType:(ASLayoutRangeType)rangeType; - (void)node:(ASDisplayNode *)node exitedRangeOfType:(ASLayoutRangeType)rangeType;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -10,6 +10,10 @@
#import <AsyncDisplayKit/ASRangeHandler.h> #import <AsyncDisplayKit/ASRangeHandler.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASRangeHandlerPreload : NSObject <ASRangeHandler> @interface ASRangeHandlerPreload : NSObject <ASRangeHandler>
@end @end
NS_ASSUME_NONNULL_END

View File

@ -10,6 +10,10 @@
#import <AsyncDisplayKit/ASRangeHandler.h> #import <AsyncDisplayKit/ASRangeHandler.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASRangeHandlerRender : NSObject <ASRangeHandler> @interface ASRangeHandlerRender : NSObject <ASRangeHandler>
@end @end
NS_ASSUME_NONNULL_END

View File

@ -10,6 +10,8 @@
#import "ASBaseDefines.h" #import "ASBaseDefines.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(NSInteger, ASScrollDirection) { typedef NS_OPTIONS(NSInteger, ASScrollDirection) {
ASScrollDirectionNone = 0, ASScrollDirectionNone = 0,
ASScrollDirectionRight = 1 << 0, ASScrollDirectionRight = 1 << 0,
@ -32,3 +34,5 @@ BOOL ASScrollDirectionContainsUp(ASScrollDirection scrollDirection);
BOOL ASScrollDirectionContainsDown(ASScrollDirection scrollDirection); BOOL ASScrollDirectionContainsDown(ASScrollDirection scrollDirection);
ASDISPLAYNODE_EXTERN_C_END ASDISPLAYNODE_EXTERN_C_END
NS_ASSUME_NONNULL_END

View File

@ -11,6 +11,7 @@
#import <AsyncDisplayKit/ASBaseDefines.h> #import <AsyncDisplayKit/ASBaseDefines.h>
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
/** /**
@ -81,3 +82,5 @@ ASDISPLAYNODE_EXTERN_C_END
+ (instancetype)paragraphStyleWithCTParagraphStyle:(CTParagraphStyleRef)coreTextParagraphStyle; + (instancetype)paragraphStyleWithCTParagraphStyle:(CTParagraphStyleRef)coreTextParagraphStyle;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef void (^as_renderer_index_block_t)(NSUInteger characterIndex, typedef void (^as_renderer_index_block_t)(NSUInteger characterIndex,
CGRect glyphBoundingRect, CGRect glyphBoundingRect,
@ -46,10 +47,10 @@ typedef NS_ENUM(NSUInteger, ASTextNodeRendererMeasureOption) {
@interface ASTextNodeRenderer : NSObject @interface ASTextNodeRenderer : NSObject
- (instancetype)initWithAttributedString:(NSAttributedString *)attributedString - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString
truncationString:(NSAttributedString *)truncationString truncationString:(nullable NSAttributedString *)truncationString
truncationMode:(NSLineBreakMode)truncationMode truncationMode:(NSLineBreakMode)truncationMode
maximumLineCount:(NSUInteger)maximumLineCount maximumLineCount:(NSUInteger)maximumLineCount
exclusionPaths:(NSArray *)exclusionPaths exclusionPaths:(nullable NSArray<UIBezierPath *> *)exclusionPaths
constrainedSize:(CGSize)constrainedSize; constrainedSize:(CGSize)constrainedSize;
/* /*
* Designated Initializer * Designated Initializer
@ -59,7 +60,7 @@ typedef NS_ENUM(NSUInteger, ASTextNodeRendererMeasureOption) {
* so feel free * so feel free
*/ */
- (instancetype)initWithAttributedString:(NSAttributedString *)attributedString - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString
truncationString:(NSAttributedString *)truncationString truncationString:(nullable NSAttributedString *)truncationString
truncationMode:(NSLineBreakMode)truncationMode truncationMode:(NSLineBreakMode)truncationMode
maximumLineCount:(NSUInteger)maximumLineCount maximumLineCount:(NSUInteger)maximumLineCount
constrainedSize:(CGSize)constrainedSize; constrainedSize:(CGSize)constrainedSize;
@ -129,7 +130,7 @@ typedef NS_ENUM(NSUInteger, ASTextNodeRendererMeasureOption) {
* *
* Triggers initialization of textkit components, truncation, and sizing. * Triggers initialization of textkit components, truncation, and sizing.
*/ */
- (NSArray *)rectsForTextRange:(NSRange)textRange - (NSArray<NSValue *> *)rectsForTextRange:(NSRange)textRange
measureOption:(ASTextNodeRendererMeasureOption)measureOption; measureOption:(ASTextNodeRendererMeasureOption)measureOption;
/* /*
@ -186,3 +187,5 @@ typedef NS_ENUM(NSUInteger, ASTextNodeRendererMeasureOption) {
- (NSUInteger)lineCount; - (NSUInteger)lineCount;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
* @abstract Negates/inverts a UIEdgeInsets. * @abstract Negates/inverts a UIEdgeInsets.
@ -67,3 +68,5 @@ static inline UIEdgeInsets ASDNEdgeInsetsInvert(UIEdgeInsets insets)
- (void)setShadowInContext:(CGContextRef)context; - (void)setShadowInContext:(CGContextRef)context;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -11,6 +11,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ASTextKitComponents : NSObject @interface ASTextKitComponents : NSObject
@ -21,7 +22,7 @@
@return An `ASTextKitComponents` containing the created components. The text view component will be nil. @return An `ASTextKitComponents` containing the created components. The text view component will be nil.
@discussion The returned components will be hooked up together, so they are ready for use as a system upon return. @discussion The returned components will be hooked up together, so they are ready for use as a system upon return.
*/ */
+ (ASTextKitComponents *)componentsWithAttributedSeedString:(NSAttributedString *)attributedSeedString + (ASTextKitComponents *)componentsWithAttributedSeedString:(nullable NSAttributedString *)attributedSeedString
textContainerSize:(CGSize)textContainerSize; textContainerSize:(CGSize)textContainerSize;
/** /**
@ -35,6 +36,8 @@
@property (nonatomic, strong, readonly) NSTextStorage *textStorage; @property (nonatomic, strong, readonly) NSTextStorage *textStorage;
@property (nonatomic, strong, readonly) NSTextContainer *textContainer; @property (nonatomic, strong, readonly) NSTextContainer *textContainer;
@property (nonatomic, strong, readonly) NSLayoutManager *layoutManager; @property (nonatomic, strong, readonly) NSLayoutManager *layoutManager;
@property (nonatomic, strong) UITextView *textView; @property (nullable, nonatomic, strong) UITextView *textView;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -9,6 +9,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/NSLayoutManager.h> #import <UIKit/NSLayoutManager.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
@abstract This class acts as the NSLayoutManagerDelegate for ASTextNode. @abstract This class acts as the NSLayoutManagerDelegate for ASTextNode.
@ -28,3 +29,5 @@
*/ */
@end @end
NS_ASSUME_NONNULL_END

View File

@ -10,9 +10,13 @@
#import "ASBaseDefines.h" #import "ASBaseDefines.h"
NS_ASSUME_NONNULL_BEGIN
ASDISPLAYNODE_EXTERN_C_BEGIN ASDISPLAYNODE_EXTERN_C_BEGIN
CGRect asdk_CGRectExpandHorizontally(CGRect rect, CGFloat negativeMultiplier, CGFloat positiveMultiplier); CGRect asdk_CGRectExpandHorizontally(CGRect rect, CGFloat negativeMultiplier, CGFloat positiveMultiplier);
CGRect asdk_CGRectExpandVertically(CGRect rect, CGFloat negativeMultiplier, CGFloat positiveMultiplier); CGRect asdk_CGRectExpandVertically(CGRect rect, CGFloat negativeMultiplier, CGFloat positiveMultiplier);
ASDISPLAYNODE_EXTERN_C_END ASDISPLAYNODE_EXTERN_C_END
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSMutableAttributedString (TextKitAdditions) @interface NSMutableAttributedString (TextKitAdditions)
@ -20,3 +21,5 @@
- (void)attributeTextInRange:(NSRange)range withTextKitParagraphStyle:(NSParagraphStyle *)paragraphStyle; - (void)attributeTextInRange:(NSRange)range withTextKitParagraphStyle:(NSParagraphStyle *)paragraphStyle;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,8 +8,12 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UICollectionViewLayout (ASConvenience) @interface UICollectionViewLayout (ASConvenience)
- (BOOL)asdk_isFlowLayout; - (BOOL)asdk_isFlowLayout;
@end @end
NS_ASSUME_NONNULL_END

View File

@ -8,6 +8,8 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/** /**
These are the properties we support from CALayer (implemented in the pending state) These are the properties we support from CALayer (implemented in the pending state)
@ -18,7 +20,7 @@
@property (nonatomic, assign) CGPoint position; @property (nonatomic, assign) CGPoint position;
@property (nonatomic, assign) CGFloat zPosition; @property (nonatomic, assign) CGFloat zPosition;
@property (nonatomic, assign) CGPoint anchorPoint; @property (nonatomic, assign) CGPoint anchorPoint;
@property (nonatomic, retain) id contents; @property (nullable, nonatomic, retain) id contents;
@property (nonatomic, assign) CGFloat cornerRadius; @property (nonatomic, assign) CGFloat cornerRadius;
@property (nonatomic, assign) CGFloat contentsScale; @property (nonatomic, assign) CGFloat contentsScale;
@property (nonatomic, assign) CATransform3D transform; @property (nonatomic, assign) CATransform3D transform;
@ -30,9 +32,9 @@
@property (nonatomic, assign) CGFloat shadowRadius; @property (nonatomic, assign) CGFloat shadowRadius;
@property (nonatomic, assign) CGFloat borderWidth; @property (nonatomic, assign) CGFloat borderWidth;
@property (nonatomic, assign, getter = isOpaque) BOOL opaque; @property (nonatomic, assign, getter = isOpaque) BOOL opaque;
@property (nonatomic, retain) __attribute__((NSObject)) CGColorRef borderColor; @property (nullable, nonatomic, retain) __attribute__((NSObject)) CGColorRef borderColor;
@property (nonatomic, copy) NSString *asyncdisplaykit_name; @property (nullable, nonatomic, copy) NSString *asyncdisplaykit_name;
@property (nonatomic, retain) __attribute__((NSObject)) CGColorRef backgroundColor; @property (nullable, nonatomic, retain) __attribute__((NSObject)) CGColorRef backgroundColor;
@property (nonatomic, assign) BOOL allowsEdgeAntialiasing; @property (nonatomic, assign) BOOL allowsEdgeAntialiasing;
@property (nonatomic, assign) unsigned int edgeAntialiasingMask; @property (nonatomic, assign) unsigned int edgeAntialiasingMask;
@ -50,7 +52,7 @@
@property (nonatomic, getter=isHidden) BOOL hidden; @property (nonatomic, getter=isHidden) BOOL hidden;
@property (nonatomic, assign) BOOL autoresizesSubviews; @property (nonatomic, assign) BOOL autoresizesSubviews;
@property (nonatomic, assign) UIViewAutoresizing autoresizingMask; @property (nonatomic, assign) UIViewAutoresizing autoresizingMask;
@property (nonatomic, retain) UIColor *tintColor; @property (nonatomic, retain, null_resettable) UIColor *tintColor;
@property (nonatomic, assign) CGFloat alpha; @property (nonatomic, assign) CGFloat alpha;
@property (nonatomic, assign) CGRect bounds; @property (nonatomic, assign) CGRect bounds;
@property (nonatomic, assign) UIViewContentMode contentMode; @property (nonatomic, assign) UIViewContentMode contentMode;
@ -76,10 +78,12 @@
*/ */
// Accessibility identification support // Accessibility identification support
@property (nonatomic, copy) NSString *accessibilityIdentifier; @property (nullable, nonatomic, copy) NSString *accessibilityIdentifier;
@end @end
@interface CALayer (ASDisplayNodeLayer) @interface CALayer (ASDisplayNodeLayer)
@property (atomic, copy) NSString *asyncdisplaykit_name; @property (nullable, atomic, copy) NSString *asyncdisplaykit_name;
@end @end
NS_ASSUME_NONNULL_END