[appledoc] Fix all appledoc warnings. (#65)

This commit is contained in:
Nadine Salter
2014-10-17 15:35:16 -07:00
parent f493b130ef
commit 9225309c9a
8 changed files with 129 additions and 15 deletions

View File

@@ -8,13 +8,21 @@
#import <AsyncDisplayKit/ASControlNode.h>
/**
* The subclass header _ASControlNode+Subclasses_ defines methods to be
* overridden by custom nodes that subclass ASControlNode.
*
* These methods should never be called directly by other classes.
*/
@interface ASControlNode (Subclassing)
/**
@abstract Sends action messages for the given control events.
@param controlEvents A bitmask whose set flags specify the control events for which action messages are sent. See "Control Events" in ASControlNode.h for bitmask constants.
@param event An event object encapsulating the information specific to the user event.
@disucssion ASControlNode implements this method to send all action messages associated with controlEvents. The list of targets is constructed from prior invocations of addTarget:action:forControlEvents:.
@param touchEvent An event object encapsulating the information specific to the user event.
@discussion ASControlNode implements this method to send all action messages associated with controlEvents. The list of targets is constructed from prior invocations of addTarget:action:forControlEvents:.
*/
- (void)sendActionsForControlEvents:(ASControlNodeEvent)controlEvents withEvent:(UIEvent *)touchEvent;
@@ -29,7 +37,7 @@
/**
@abstract Sent continuously to the control as it tracks a touch within the control's bounds.
@param touch The touch on the receiving control.
@param touchevent An event object encapsulating the information specific to the user event.
@param touchEvent An event object encapsulating the information specific to the user event.
@result YES if touch tracking should continue; NO otherwise.
*/
- (BOOL)continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)touchEvent;

View File

@@ -102,6 +102,8 @@
/**
* @abstract Return the calculated size.
*
* @param constrainedSize The maximum size the receiver should fit in.
*
* @discussion Subclasses that override should expect this method to be called on a non-main thread. The returned size
* is cached by ASDisplayNode for quick access during -layout, via -calculatedSize. Other expensive work that needs to
* be done before display can be performed here, and using ivars to cache any valuable intermediate results is
@@ -127,9 +129,10 @@
* @summary Delegate method to draw layer contents into a CGBitmapContext. The current UIGraphics context will be set
* to an appropriate context.
*
* @param bounds Region to draw in.
* @param parameters An object describing all of the properties you need to draw. Return this from
* -drawParametersForAsyncLayer:
* @param isCancelled Execute this block to check whether the current drawing operation has been cancelled to avoid
* @param isCancelledBlock Execute this block to check whether the current drawing operation has been cancelled to avoid
* unnecessary work. A return value of YES means cancel drawing and return.
* @param isRasterizing YES if the layer is being rasterized into another layer, in which case drawRect: probably wants
* to avoid doing things like filling its bounds with a zero-alpha color to clear the backing store.
@@ -146,7 +149,7 @@
*
* @param parameters An object describing all of the properties you need to draw. Return this from
* -drawParametersForAsyncLayer:
* @param isCancelled Execute this block to check whether the current drawing operation has been cancelled to avoid
* @param isCancelledBlock Execute this block to check whether the current drawing operation has been cancelled to avoid
* unnecessary work. A return value of YES means cancel drawing and return.
*
* @return A UIImage with contents that are ready to display on the main thread. Make sure that the image is already
@@ -160,6 +163,8 @@
/**
* @abstract Delegate override for drawParameters
*
* @param layer The layer that will be drawn into.
*
* @note Called on the main thread only
*/
- (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer;
@@ -176,17 +181,21 @@
/**
* @abstract Marks the receiver's bounds as needing to be redrawn, with a scale value.
*
* @param contentsScale The scale at which the receiver should be drawn.
*
* @discussion Subclasses should override this if they don't want their contentsScale changed.
*
* @note This changes an internal property.
* -setNeedsDisplay is also available to trigger display without changing contentsScaleForDisplay.
* @see contentsScaleForDisplay
* @see -setNeedsDisplay, contentsScaleForDisplay
*/
- (void)setNeedsDisplayAtScale:(CGFloat)contentsScale;
/**
* @abstract Recursively calls setNeedsDisplayAtScale: on subnodes.
*
* @param contentsScale The scale at which the receiver's subnode hierarchy should be drawn.
*
* @discussion Subclasses may override this if they require modifying the scale set on their child nodes.
*
* @note Only the node tree is walked, not the view or layer trees.

View File

@@ -127,7 +127,7 @@
/**
* @abstract Asks the node to calculate and return the size that best fits its subnodes.
*
* @param size The current size of the receiver.
* @param constrainedSize The maximum size the receiver should fit in.
*
* @return A new size that fits the receiver's subviews.
*
@@ -316,6 +316,8 @@
/**
* @abstract Prevent the node and its descendants' layer from displaying.
*
* @param flag YES if display should be prevented or cancelled; NO otherwise.
*
* @see preventOrCancelDisplay
*/
- (void)recursiveSetPreventOrCancelDisplay:(BOOL)flag;
@@ -409,10 +411,14 @@
@end
/**
* Convenience methods for debugging.
*/
@interface ASDisplayNode (Debugging)
/**
* @abstract Return a description of the node hierarchy
* @abstract Return a description of the node hierarchy.
*
* @discussion For debugging: (lldb) po [node displayNodeRecursiveDescription]
*/

View File

@@ -8,11 +8,26 @@
#import <AsyncDisplayKit/ASControlNode.h>
/**
* Image tints.
*/
typedef NS_ENUM(NSUInteger, ASImageNodeTint) {
/**
* No tint.
*/
ASImageNodeTintNormal = 0,
/**
* Display the image in greyscale.
*/
ASImageNodeTintGreyscale,
};
/**
* Image modification block. Use to transform an image before display.
*
* @param image The image to be displayed.
*/
typedef UIImage *(^asimagenode_modification_block_t)(UIImage *image);
/**
@@ -91,10 +106,8 @@ typedef UIImage *(^asimagenode_modification_block_t)(UIImage *image);
* display has finished.
*
* @param displayCompletionBlock The block to be performed after display has
* finished.
*
* @param canceled YES if display was prevented or canceled (via
* preventOrCancelDisplay); NO otherwise.
* finished. Its `canceled` property will be YES if display was prevented or
* canceled (via preventOrCancelDisplay); NO otherwise.
*
* @discussion displayCompletionBlock will be performed on the main-thread. If
* `preventOrCancelDisplay` is YES, `displayCompletionBlock` is will be

View File

@@ -84,7 +84,11 @@
/**
* Similar to -tableView:cellForRowAtIndexPath:.
*
* Return a node for display at this indexpath. Must be thread-safe (can be called on the main thread or a background
* @param tableView The sender.
*
* @param indexPath The index path of the requested node.
*
* @returns a node for display at this indexpath. Must be thread-safe (can be called on the main thread or a background
* queue) and should not implement reuse (it will be called once per row). Unlike UITableView's version, this method
* is not called when the row is about to display.
*/

View File

@@ -10,8 +10,18 @@
@protocol ASTextNodeDelegate;
/**
* Highlight styles.
*/
typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
/**
* Highlight style for text on a light background.
*/
ASTextNodeHighlightStyleLight,
/**
* Highlight style for text on a dark background.
*/
ASTextNodeHighlightStyleDark
};
@@ -146,6 +156,10 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
/**
@abstract Set the range of text to highlight, with optional animation.
@param highlightRange The range of text to highlight.
@param animated Whether the text should be highlighted with an animation.
*/
- (void)setHighlightRange:(NSRange)highlightRange animated:(BOOL)animated;
@@ -156,6 +170,9 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
@end
/**
* @abstract Text node delegate.
*/
@protocol ASTextNodeDelegate <NSObject>
@optional
@@ -165,6 +182,7 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
@param attribute The attribute that was tapped. Will not be nil.
@param value The value of the tapped attribute.
@param point The point within textNode, in textNode's coordinate system, that was tapped.
@param textRange The range of highlighted text.
*/
- (void)textNode:(ASTextNode *)textNode tappedLinkAttribute:(NSString *)attribute value:(id)value atPoint:(CGPoint)point textRange:(NSRange)textRange;
@@ -174,6 +192,7 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
@param attribute The attribute that was tapped. Will not be nil.
@param value The value of the tapped attribute.
@param point The point within textNode, in textNode's coordinate system, that was tapped.
@param textRange The range of highlighted text.
*/
- (void)textNode:(ASTextNode *)textNode longPressedLinkAttribute:(NSString *)attribute value:(id)value atPoint:(CGPoint)point textRange:(NSRange)textRange;

View File

@@ -52,12 +52,18 @@ typedef struct {
/**
* Add the sized node for `indexPath` as a subview of `contentView`.
*
* @param contentView UIView to add a (sized) node's view to.
*
* @param indexPath Index path for the node to be added.
*/
- (void)configureContentView:(UIView *)contentView forIndexPath:(NSIndexPath *)indexPath;
/**
* Query the sized node at `indexPath` for its calculatedSize.
*
* @param indexPath The index path for the node of interest.
*
* TODO: Currently we disallow direct access to ASCellNode outside ASRangeController since touching the node's view can
* break async display. We should expose the node anyway, possibly with an assertion guarding against external
* use of the view property, so ASCellNode can support configuration for UITableViewCell properties (selection
@@ -67,6 +73,8 @@ typedef struct {
/**
* Notify the receiver that its data source has been updated to append the specified nodes.
*
* @param indexPaths Array of NSIndexPaths for the newly-sized nodes.
*/
- (void)appendNodesWithIndexPaths:(NSArray *)indexPaths;
@@ -85,32 +93,71 @@ typedef struct {
@end
/**
* <ASRangeController> delegate. For example, <ASTableView>.
*/
@protocol ASRangeControllerDelegate <NSObject>
/**
* @param rangeController Sender.
*
* @returns an array of index paths corresponding to the nodes currently visible onscreen (i.e., the visible range).
*/
- (NSArray *)rangeControllerVisibleNodeIndexPaths:(ASRangeController *)rangeController;
/**
* @param rangeController Sender.
*
* @returns the receiver's viewport size (i.e., the screen space occupied by the visible range).
*/
- (CGSize)rangeControllerViewportSize:(ASRangeController *)rangeController;
/**
* Forwarded to ASTableView's data source.
* @param rangeController Sender.
*
* @returns The number of total sections.
*
* @discussion <ASTableView> forwards this method to its data source.
*/
- (NSInteger)rangeControllerSections:(ASRangeController *)rangeController;
/**
* @param rangeController Sender.
*
* @param section Section.
*
* @returns The number of rows in `section`.
*
* @discussion <ASTableView> forwards this method to its data source.
*/
- (NSInteger)rangeController:(ASRangeController *)rangeController rowsInSection:(NSInteger)section;
/**
* @param rangeController Sender.
*
* @param indexPath Index path for the node of interest.
*
* @returns A new <ASCellNode> corresponding to `indexPath`.
*
* @discussion <ASTableView> forwards this method to its data source.
*/
- (ASCellNode *)rangeController:(ASRangeController *)rangeController nodeForIndexPath:(NSIndexPath *)indexPath;
/**
* @returns sizing constraints for the node at `indexPath`.
* @param rangeController Sender.
*
* @param indexPath Node to be sized.
*
* @returns Sizing constraints for the node at `indexPath`, to be used as an argument to <[ASDisplayNode measure:]>.
*/
- (CGSize)rangeController:(ASRangeController *)rangeController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath;
/**
* Notifies the receiver that the specified nodes have been sized and are ready for display.
*
* @param rangeController Sender.
*
* @param indexPaths Array of NSIndexPaths for the newly-sized nodes.
*/
- (void)rangeController:(ASRangeController *)rangeController didSizeNodesWithIndexPaths:(NSArray *)indexPaths;

View File

@@ -14,6 +14,14 @@ appledoc \
--no-repeat-first-par \
--no-merge-categories \
--explicit-crossref \
--warn-missing-output-path \
--warn-missing-company-id \
--warn-undocumented-object \
--warn-undocumented-member \
--warn-empty-description \
--warn-unknown-directive \
--warn-invalid-crossref \
--warn-missing-arg \
--project-name AsyncDisplayKit \
--project-company Facebook \
--company-id "com.facebook" \