Skip to content

Commit de4e4db

Browse files
committed
Merge pull request facebookarchive#1340 from ejensen/documentation-corrections
[Documentation] Various header documentation corrections and refinements.
2 parents 1ce3834 + c2f8539 commit de4e4db

16 files changed

+44
-31
lines changed

AsyncDisplayKit/ASButtonNode.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
@property (nonatomic, assign) ASVerticalAlignment contentVerticalAlignment;
3939

4040
/**
41-
* @discussion insets the title and the image node
42-
*
43-
* @param contentEdgeInsets The insets used around the title and image node
41+
* @discussion The insets used around the title and image node
4442
*/
4543
@property (nonatomic, assign) UIEdgeInsets contentEdgeInsets;
4644

AsyncDisplayKit/ASCollectionView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN
173173
/**
174174
* Registers the given kind of supplementary node for use in creating node-backed supplementary views.
175175
*
176-
* @param kind The kind of supplementary node that will be requested through the data source.
176+
* @param elementKind The kind of supplementary node that will be requested through the data source.
177177
*
178178
* @discussion Use this method to register support for the use of supplementary nodes in place of the default
179179
* `registerClass:forSupplementaryViewOfKind:withReuseIdentifier:` and `registerNib:forSupplementaryViewOfKind:withReuseIdentifier:`

AsyncDisplayKit/ASCollectionViewLayoutFacilitatorProtocol.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
/**
1919
* Inform that the collectionView is editing the cells at a list of indexPaths
2020
*
21-
* @param indexPaths, an array of NSIndexPath objects of cells being/will be edited.
22-
* @param isBatched, indicates whether the editing operation will be batched by the collectionView
21+
* @param indexPaths an array of NSIndexPath objects of cells being/will be edited.
22+
* @param isBatched indicates whether the editing operation will be batched by the collectionView
2323
*
2424
* NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
2525
*/
@@ -28,10 +28,10 @@
2828
/**
2929
* Inform that the collectionView is editing the sections at a set of indexes
3030
*
31-
* @param indexes, an NSIndexSet of section indexes being/will be edited.
32-
* @param isBatched, indicates whether the editing operation will be batched by the collectionView
31+
* @param indexes an NSIndexSet of section indexes being/will be edited.
32+
* @param batched indicates whether the editing operation will be batched by the collectionView
3333
*
34-
* NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
34+
* NOTE: when batched, used in combination with -collectionViewWillPerformBatchUpdates
3535
*/
3636
- (void)collectionViewWillEditSectionsAtIndexSet:(NSIndexSet *)indexes batched:(BOOL)batched;
3737

AsyncDisplayKit/ASControlNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ typedef NS_OPTIONS(NSUInteger, ASControlState) {
122122

123123
/**
124124
Class method to enable a visualization overlay of the tapable area on the ASControlNode. For app debugging purposes only.
125-
@param enabled Specify YES to make this debug feature enabled when messaging the ASControlNode class.
125+
@param enable Specify YES to make this debug feature enabled when messaging the ASControlNode class.
126126
*/
127127
+ (void)setEnableHitTestDebug:(BOOL)enable;
128128
@end

AsyncDisplayKit/ASImageNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlock(CGFloat
131131
* @abstract Image modification block that applies a tint color à la UIImage configured with
132132
* renderingMode set to UIImageRenderingModeAlwaysTemplate.
133133
*
134-
* @param tintColor The color to tint the image.
134+
* @param color The color to tint the image.
135135
*
136136
* @see <imageModificationBlock>
137137
*

AsyncDisplayKit/ASMultiplexImageNode.mm

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ - (void)_loadNextImage;
124124
@param imageIdentifier The identifier for the image to be fetched. May not be nil.
125125
@param imageURL The URL of the image to fetch. May not be nil.
126126
@param completionBlock The block to be performed when the image has been fetched from the cache, if possible. May not be nil.
127-
@param image The image fetched from the cache, if any.
127+
@param image The image fetched from the cache, if any.
128128
@discussion This method queries both the session's in-memory and on-disk caches (with preference for the in-memory cache).
129129
*/
130130
- (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image))completionBlock;
@@ -135,8 +135,8 @@ - (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imag
135135
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
136136
@param assetURL The assets-library URL (e.g., "assets-library://identifier") of the image to load, from ALAsset. May not be nil.
137137
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
138-
@param image The image that was loaded. May be nil if no image could be downloaded.
139-
@param error An error describing why the load failed, if it failed; nil otherwise.
138+
@param image The image that was loaded. May be nil if no image could be downloaded.
139+
@param error An error describing why the load failed, if it failed; nil otherwise.
140140
*/
141141
- (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
142142

@@ -145,8 +145,8 @@ - (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL com
145145
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
146146
@param request The photos image request to load. May not be nil.
147147
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
148-
@param image The image that was loaded. May be nil if no image could be downloaded.
149-
@param error An error describing why the load failed, if it failed; nil otherwise.
148+
@param image The image that was loaded. May be nil if no image could be downloaded.
149+
@param error An error describing why the load failed, if it failed; nil otherwise.
150150
*/
151151
- (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identifier:(id)imageIdentifier completion:(void (^)(UIImage *image, NSError *error))completionBlock;
152152
#endif
@@ -155,8 +155,8 @@ - (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identif
155155
@param imageIdentifier The identifier for the image to be downloaded. May not be nil.
156156
@param imageURL The URL of the image to downloaded. May not be nil.
157157
@param completionBlock The block to be performed when the image has been downloaded, if possible. May not be nil.
158-
@param image The image that was downloaded. May be nil if no image could be downloaded.
159-
@param error An error describing why the download failed, if it failed; nil otherwise.
158+
@param image The image that was downloaded. May be nil if no image could be downloaded.
159+
@param error An error describing why the download failed, if it failed; nil otherwise.
160160
*/
161161
- (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
162162

@@ -737,10 +737,13 @@ - (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imag
737737
completionBlock(imageFromCache);
738738
}];
739739
} else {
740+
#pragma clang diagnostic push
741+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
740742
[_cache fetchCachedImageWithURL:imageURL callbackQueue:dispatch_get_main_queue() completion:^(CGImageRef coreGraphicsImageFromCache) {
741743
UIImage *imageFromCache = (coreGraphicsImageFromCache ? [UIImage imageWithCGImage:coreGraphicsImageFromCache] : nil);
742744
completionBlock(imageFromCache);
743745
}];
746+
#pragma clang diagnostic pop
744747
}
745748
}
746749
// If we don't have a cache, just fail immediately.
@@ -795,6 +798,8 @@ - (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL c
795798
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
796799
}]];
797800
} else {
801+
#pragma clang diagnostic push
802+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
798803
[self _setDownloadIdentifier:[_downloader downloadImageWithURL:imageURL
799804
callbackQueue:dispatch_get_main_queue()
800805
downloadProgressBlock:downloadProgressBlock
@@ -811,6 +816,7 @@ - (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL c
811816
if (strongSelf->_delegateFlags.downloadFinish)
812817
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
813818
}]];
819+
#pragma clang diagnostic pop
814820
}
815821
});
816822
}

AsyncDisplayKit/ASNetworkImageNode.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ - (void)_downloadImageWithCompletion:(void (^)(UIImage *image, NSError*, id down
295295
}
296296
}];
297297
} else {
298+
#pragma clang diagnostic push
299+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
298300
_downloadIdentifier = [_downloader downloadImageWithURL:_URL
299301
callbackQueue:dispatch_get_main_queue()
300302
downloadProgressBlock:NULL
@@ -303,6 +305,7 @@ - (void)_downloadImageWithCompletion:(void (^)(UIImage *image, NSError*, id down
303305
finished([UIImage imageWithCGImage:responseImage], error, nil);
304306
}
305307
}];
308+
#pragma clang diagnostic pop
306309
}
307310
});
308311
}
@@ -401,11 +404,14 @@ - (void)_lazilyLoadImageIfNecessary
401404
callbackQueue:dispatch_get_main_queue()
402405
completion:cacheCompletion];
403406
} else {
407+
#pragma clang diagnostic push
408+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
404409
[_cache fetchCachedImageWithURL:_URL
405410
callbackQueue:dispatch_get_main_queue()
406411
completion:^(CGImageRef image) {
407412
cacheCompletion([UIImage imageWithCGImage:image]);
408413
}];
414+
#pragma clang diagnostic pop
409415
}
410416
} else {
411417
[self _downloadImageWithCompletion:finished];

AsyncDisplayKit/ASPagerNode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/**
5656
* Provides the constrained size range for measuring the node at the index path.
5757
*
58-
* @param collectionView The sender.
58+
* @param pagerNode The sender.
5959
*
6060
* @param indexPath The index path of the node.
6161
*

AsyncDisplayKit/ASTableViewInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @param dataControllerClass A controller class injected to and used to create a data controller for the table view.
2828
*
29-
* @param asyncDataFetchingEnabled This option is reserved for future use, and currently a no-op.
29+
* @param ownedByNode Indicates whether the tableView is owned by an ASTableNode.
3030
*/
3131
- (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode;
3232

AsyncDisplayKit/Details/ASImageProtocols.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
#import <UIKit/UIKit.h>
10-
#import <Foundation/Foundation.h>
10+
#import <AsyncDisplayKit/ASBaseDefines.h>
1111

1212
NS_ASSUME_NONNULL_BEGIN
1313

@@ -115,7 +115,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
115115
- (nullable id)downloadImageWithURL:(NSURL *)URL
116116
callbackQueue:(nullable dispatch_queue_t)callbackQueue
117117
downloadProgressBlock:(void (^ _Nullable)(CGFloat progress))downloadProgressBlock
118-
completion:(void (^ _Nullable)(CGImageRef _Nullable image, NSError * _Nullable error))completion;
118+
completion:(void (^ _Nullable)(CGImageRef _Nullable image, NSError * _Nullable error))completion ASDISPLAYNODE_DEPRECATED;
119119

120120
@end
121121

@@ -127,7 +127,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
127127
*/
128128
- (void)fetchCachedImageWithURL:(nullable NSURL *)URL
129129
callbackQueue:(nullable dispatch_queue_t)callbackQueue
130-
completion:(void (^)(CGImageRef _Nullable imageFromCache))completion;
130+
completion:(void (^)(CGImageRef _Nullable imageFromCache))completion ASDISPLAYNODE_DEPRECATED;
131131

132132
@end
133133

0 commit comments

Comments
 (0)