diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index ec6fd3242e..8254a95b64 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -31,11 +31,11 @@ @property (nonatomic, weak) id asyncDelegate; // must not be nil /** - * Tuning parameters for a range. + * Tuning parameters for a range type. * - * @param range The range to get the tuning parameters for. + * @param rangeType The range type to get the tuning parameters for. * - * @returns A tuning parameter value for the given range. + * @returns A tuning parameter value for the given range type. * * Defaults to the render range having one sceenful both leading and trailing and the preload range having two * screenfuls in both directions. @@ -43,16 +43,24 @@ - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType; /** - * Set the tuning parameters for a range. + * Set the tuning parameters for a range type. * - * @param tuningParameters The tuning parameters to store for a range. - * @param range The range to set the tuning parameters for. + * @param tuningParameters The tuning parameters to store for a range type. + * @param rangeType The range type to set the tuning parameters for. */ - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType; /** * Initializer. * + * @param frame The frame rectangle for the collection view, measured in points. The origin of the frame is relative to the superview + * in which you plan to add it. This frame is passed to the superclass during initialization. + * + * @param layout The layout object to use for organizing items. The collection view stores a strong reference to the specified object. + * Must not be nil. + * + * @param asyncDataFetchingEnabled Enable the data fetching in async mode. + * * @discussion If asyncDataFetching is enabled, the `AScollectionView` will fetch data through `collectionView:numberOfRowsInSection:` and * `collectionView:nodeForRowAtIndexPath:` in async mode from background thread. Otherwise, the methods will be invoked synchronically * from calling thread. @@ -156,7 +164,7 @@ /** * Similar to -collectionView:cellForItemAtIndexPath:. * - * @param collection The sender. + * @param collectionView The sender. * * @param indexPath The index path of the requested node. * diff --git a/AsyncDisplayKit/ASControlNode.h b/AsyncDisplayKit/ASControlNode.h index b94bb77227..d08a09c69a 100644 --- a/AsyncDisplayKit/ASControlNode.h +++ b/AsyncDisplayKit/ASControlNode.h @@ -15,14 +15,21 @@ */ typedef NS_OPTIONS(NSUInteger, ASControlNodeEvent) { + /** A touch-down event in the control node. */ ASControlNodeEventTouchDown = 1 << 0, + /** A repeated touch-down event in the control node; for this event the value of the UITouch tapCount method is greater than one. */ ASControlNodeEventTouchDownRepeat = 1 << 1, + /** An event where a finger is dragged inside the bounds of the control node. */ ASControlNodeEventTouchDragInside = 1 << 2, + /** An event where a finger is dragged just outside the bounds of the control. */ ASControlNodeEventTouchDragOutside = 1 << 3, + /** A touch-up event in the control node where the finger is inside the bounds of the node. */ ASControlNodeEventTouchUpInside = 1 << 4, + /** A touch-up event in the control node where the finger is outside the bounds of the node. */ ASControlNodeEventTouchUpOutside = 1 << 5, + /** A system event canceling the current touches for the control node. */ ASControlNodeEventTouchCancel = 1 << 6, - + /** All events, including system events. */ ASControlNodeEventAllEvents = 0xFFFFFFFF }; diff --git a/AsyncDisplayKit/ASDisplayNode+Subclasses.h b/AsyncDisplayKit/ASDisplayNode+Subclasses.h index fec0527f27..745b0c3240 100644 --- a/AsyncDisplayKit/ASDisplayNode+Subclasses.h +++ b/AsyncDisplayKit/ASDisplayNode+Subclasses.h @@ -267,6 +267,8 @@ * @abstract Indicates that the receiver is about to display its subnodes. This method is not called if there are no * subnodes present. * + * @param subnode The subnode of which display is about to begin. + * * @discussion Subclasses may override this method to be notified when subnode display (asynchronous or synchronous) is * about to begin. */ @@ -276,6 +278,8 @@ * @abstract Indicates that the receiver is finished displaying its subnodes. This method is not called if there are * no subnodes present. * + * @param subnode The subnode of which display is about to completed. + * * @discussion Subclasses may override this method to be notified when subnode display (asynchronous or synchronous) has * completed. */ diff --git a/AsyncDisplayKit/ASDisplayNode.h b/AsyncDisplayKit/ASDisplayNode.h index bd0c5727ab..efa17d524d 100644 --- a/AsyncDisplayKit/ASDisplayNode.h +++ b/AsyncDisplayKit/ASDisplayNode.h @@ -13,7 +13,13 @@ #import #import +/** + * UIView creation block. Used to create the backing view of a new display node. + */ typedef UIView *(^ASDisplayNodeViewBlock)(); +/** + * CALayer creation block. Used to create the backing layer of a new display node. + */ typedef CALayer *(^ASDisplayNodeLayerBlock)(); /** @@ -50,6 +56,8 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)(); /** * @abstract Alternative initializer with a block to create the backing view. * + * @param viewBlock The block that will be used to create the backing view. + * * @return An ASDisplayNode instance that loads its view with the given block that is guaranteed to run on the main * queue. The view will render synchronously and -layout and touch handling methods on the node will not be called. */ @@ -58,6 +66,8 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)(); /** * @abstract Alternative initializer with a block to create the backing layer. * + * @param viewBlock The block that will be used to create the backing layer. + * * @return An ASDisplayNode instance that loads its layer with the given block that is guaranteed to run on the main * queue. The layer will render synchronously and -layout and touch handling methods on the node will not be called. */ @@ -332,7 +342,7 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)(); * This method is used to notify the node that it should purge any content that is both expensive to fetch and to * retain in memory. * - * @see clearFetchedData and fetchData + * @see ASDisplayNode(Subclassing):clearFetchedData and fetchData */ - (void)recursivelyClearFetchedData; @@ -341,7 +351,7 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)(); * * @discussion Fetches content from remote sources for the current node and all subnodes. * - * @see fetchData and clearFetchedData + * @see ASDisplayNode(Subclassing):fetchData and clearFetchedData */ - (void)recursivelyFetchData; @@ -556,18 +566,22 @@ typedef CALayer *(^ASDisplayNodeLayerBlock)(); @interface ASDisplayNode (ASDisplayNodeAsyncTransactionContainer) @end - +/** UIVIew(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to an UIView. */ @interface UIView (AsyncDisplayKit) /** * Convenience method, equivalent to [view addSubview:node.view] or [view.layer addSublayer:node.layer] if layer-backed. + * + * @param node The node to be added. */ - (void)addSubnode:(ASDisplayNode *)node; @end - +/** CALayer(AsyncDisplayKit) defines convenience method for adding sub-ASDisplayNode to a CALayer. */ @interface CALayer (AsyncDisplayKit) /** * Convenience method, equivalent to [layer addSublayer:node.layer]. + * + * @param node The node to be added. */ - (void)addSubnode:(ASDisplayNode *)node; @end diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index 92811e2457..fb3354c8e8 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -11,10 +11,10 @@ @protocol ASEditableTextNodeDelegate; -//! @abstract ASEditableTextNode implements a node that supports text editing. +/// @abstract ASEditableTextNode implements a node that supports text editing. @interface ASEditableTextNode : ASDisplayNode -//! @abstract The text node's delegate, which must conform to the protocol. +// @abstract The text node's delegate, which must conform to the protocol. @property (nonatomic, readwrite, weak) id delegate; #pragma mark - Configuration @@ -74,6 +74,11 @@ @end #pragma mark - +/** + * The methods declared by the ASEditableTextNodeDelegate protocol allow the adopting delegate to + * respond to notifications such as began and finished editing, selection changed and text updated; + * and manage whether a specified text should be replaced. + */ @protocol ASEditableTextNodeDelegate @optional diff --git a/AsyncDisplayKit/ASMultiplexImageNode.h b/AsyncDisplayKit/ASMultiplexImageNode.h index c62f7c3153..db10daa324 100644 --- a/AsyncDisplayKit/ASMultiplexImageNode.h +++ b/AsyncDisplayKit/ASMultiplexImageNode.h @@ -102,6 +102,10 @@ typedef NS_ENUM(NSUInteger, ASMultiplexImageNodeErrorCode) { #pragma mark - +/** + * The methods declared by the ASMultiplexImageNodeDelegate protocol allow the adopting delegate to respond to + * notifications such as began, progressed and finished downloading, updated and displayed an image. + */ @protocol ASMultiplexImageNodeDelegate @optional @@ -170,6 +174,10 @@ didFinishDownloadingImageWithIdentifier:(id)imageIdentifier #pragma mark - +/** + * The ASMultiplexImageNodeDataSource protocol is adopted by an object that provides the multiplex image node, + * for each image identifier, an image or a URL the image node should load. + */ @protocol ASMultiplexImageNodeDataSource @optional diff --git a/AsyncDisplayKit/ASNetworkImageNode.h b/AsyncDisplayKit/ASNetworkImageNode.h index 7039004c95..5dc723521e 100644 --- a/AsyncDisplayKit/ASNetworkImageNode.h +++ b/AsyncDisplayKit/ASNetworkImageNode.h @@ -61,6 +61,8 @@ /** * Download and display a new image. * + * @param URL The URL of a new image to download and display. + * * @param reset Whether to display a placeholder () while loading the new image. */ - (void)setURL:(NSURL *)URL resetToDefault:(BOOL)reset; @@ -74,6 +76,10 @@ #pragma mark - +/** + * The methods declared by the ASNetworkImageNodeDelegate protocol allow the adopting delegate to respond to + * notifications such as fininished decoding and downloading an image. + */ @protocol ASNetworkImageNodeDelegate /** diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 8b399a01b4..1e0534c83b 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -51,7 +51,14 @@ - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType; /** - * initializer. + * Initializer. + * + * @param frame A rectangle specifying the initial location and size of the table view in its superview’€™s coordinates. + * The frame of the table view changes as table cells are added and deleted. + * + * @param style A constant that specifies the style of the table view. See UITableViewStyle for descriptions of valid constants. + * + * @param asyncDataFetchingEnabled Enable the data fetching in async mode. * * @discussion If asyncDataFetching is enabled, the `ASTableView` will fetch data through `tableView:numberOfRowsInSection:` and * `tableView:nodeForRowAtIndexPath:` in async mode from background thread. Otherwise, the methods will be invoked synchronically diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index 08dfd4fbf2..5ec49b5ce0 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -111,7 +111,7 @@ typedef NSUInteger ASDataControllerAnimationOptions; @property (nonatomic, weak) id delegate; /** - * Designated iniailizer. + * Designated initializer. * * @param asyncDataFetchingEnabled Enable the data fetching in async mode. * diff --git a/AsyncDisplayKit/Details/ASRangeController.h b/AsyncDisplayKit/Details/ASRangeController.h index cdfb0568b4..d8dd1bf58e 100644 --- a/AsyncDisplayKit/Details/ASRangeController.h +++ b/AsyncDisplayKit/Details/ASRangeController.h @@ -30,6 +30,8 @@ * Notify the range controller that the visible range has been updated. * This is the primary input call that drives updating the working ranges, and triggering their actions. * + * @param scrollDirection The current scroll direction of the scroll view. + * * @see [ASRangeControllerDelegate rangeControllerVisibleNodeIndexPaths:] */ - (void)visibleNodeIndexPathsDidChangeWithScrollDirection:(ASScrollDirection)scrollDirection; @@ -74,36 +76,70 @@ /** * Begin updates. + * + * @param rangeController Sender. */ - (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController; /** * End updates. + * + * @param rangeController Sender. + * + * @param completion Completion block. */ - (void)rangeControllerEndUpdates:(ASRangeController * )rangeController completion:(void (^)(BOOL))completion ; /** * Fetch nodes at specific index paths. + * + * @param rangeController Sender. + * + * @param indexPaths Index paths. */ - (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths; /** * Called for nodes insertion. + * + * @param rangeController Sender. + * + * @param indexPaths Index path of inserted nodes. + * + * @param animationOptions Animation options. See ASDataControllerAnimationOptions. */ - (void)rangeController:(ASRangeController *)rangeController didInsertNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; /** * Called for nodes deletion. + * + * @param rangeController Sender. + * + * @param indexPaths Index path of deleted nodes. + * + * @param animationOptions Animation options. See ASDataControllerAnimationOptions. */ - (void)rangeController:(ASRangeController *)rangeController didDeleteNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; /** * Called for section insertion. + * + * @param rangeController Sender. + * + * @param indexSet Index set of inserted sections. + * + * @param animationOptions Animation options. See ASDataControllerAnimationOptions. */ - (void)rangeController:(ASRangeController *)rangeController didInsertSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions; /** * Called for section deletion. + * + * @param rangeController Sender. + * + * @param indexSet Index set of deleted sections. + * + * @param animationOptions Animation options. See ASDataControllerAnimationOptions. */ - (void)rangeController:(ASRangeController *)rangeController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions;