mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-13 09:50:17 +00:00
Merge pull request #1340 from ejensen/documentation-corrections
[Documentation] Various header documentation corrections and refinements.
This commit is contained in:
commit
de4e4db671
@ -38,9 +38,7 @@
|
|||||||
@property (nonatomic, assign) ASVerticalAlignment contentVerticalAlignment;
|
@property (nonatomic, assign) ASVerticalAlignment contentVerticalAlignment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @discussion insets the title and the image node
|
* @discussion The insets used around the title and image node
|
||||||
*
|
|
||||||
* @param contentEdgeInsets The insets used around the title and image node
|
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, assign) UIEdgeInsets contentEdgeInsets;
|
@property (nonatomic, assign) UIEdgeInsets contentEdgeInsets;
|
||||||
|
|
||||||
|
|||||||
@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/**
|
/**
|
||||||
* Registers the given kind of supplementary node for use in creating node-backed supplementary views.
|
* Registers the given kind of supplementary node for use in creating node-backed supplementary views.
|
||||||
*
|
*
|
||||||
* @param kind The kind of supplementary node that will be requested through the data source.
|
* @param elementKind The kind of supplementary node that will be requested through the data source.
|
||||||
*
|
*
|
||||||
* @discussion Use this method to register support for the use of supplementary nodes in place of the default
|
* @discussion Use this method to register support for the use of supplementary nodes in place of the default
|
||||||
* `registerClass:forSupplementaryViewOfKind:withReuseIdentifier:` and `registerNib:forSupplementaryViewOfKind:withReuseIdentifier:`
|
* `registerClass:forSupplementaryViewOfKind:withReuseIdentifier:` and `registerNib:forSupplementaryViewOfKind:withReuseIdentifier:`
|
||||||
|
|||||||
@ -18,8 +18,8 @@
|
|||||||
/**
|
/**
|
||||||
* Inform that the collectionView is editing the cells at a list of indexPaths
|
* Inform that the collectionView is editing the cells at a list of indexPaths
|
||||||
*
|
*
|
||||||
* @param indexPaths, an array of NSIndexPath objects of cells being/will be edited.
|
* @param indexPaths an array of NSIndexPath objects of cells being/will be edited.
|
||||||
* @param isBatched, indicates whether the editing operation will be batched by the collectionView
|
* @param isBatched indicates whether the editing operation will be batched by the collectionView
|
||||||
*
|
*
|
||||||
* NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
|
* NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
|
||||||
*/
|
*/
|
||||||
@ -28,10 +28,10 @@
|
|||||||
/**
|
/**
|
||||||
* Inform that the collectionView is editing the sections at a set of indexes
|
* Inform that the collectionView is editing the sections at a set of indexes
|
||||||
*
|
*
|
||||||
* @param indexes, an NSIndexSet of section indexes being/will be edited.
|
* @param indexes an NSIndexSet of section indexes being/will be edited.
|
||||||
* @param isBatched, indicates whether the editing operation will be batched by the collectionView
|
* @param batched indicates whether the editing operation will be batched by the collectionView
|
||||||
*
|
*
|
||||||
* NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates
|
* NOTE: when batched, used in combination with -collectionViewWillPerformBatchUpdates
|
||||||
*/
|
*/
|
||||||
- (void)collectionViewWillEditSectionsAtIndexSet:(NSIndexSet *)indexes batched:(BOOL)batched;
|
- (void)collectionViewWillEditSectionsAtIndexSet:(NSIndexSet *)indexes batched:(BOOL)batched;
|
||||||
|
|
||||||
|
|||||||
@ -122,7 +122,7 @@ typedef NS_OPTIONS(NSUInteger, ASControlState) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Class method to enable a visualization overlay of the tapable area on the ASControlNode. For app debugging purposes only.
|
Class method to enable a visualization overlay of the tapable area on the ASControlNode. For app debugging purposes only.
|
||||||
@param enabled Specify YES to make this debug feature enabled when messaging the ASControlNode class.
|
@param enable Specify YES to make this debug feature enabled when messaging the ASControlNode class.
|
||||||
*/
|
*/
|
||||||
+ (void)setEnableHitTestDebug:(BOOL)enable;
|
+ (void)setEnableHitTestDebug:(BOOL)enable;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -131,7 +131,7 @@ asimagenode_modification_block_t ASImageNodeRoundBorderModificationBlock(CGFloat
|
|||||||
* @abstract Image modification block that applies a tint color à la UIImage configured with
|
* @abstract Image modification block that applies a tint color à la UIImage configured with
|
||||||
* renderingMode set to UIImageRenderingModeAlwaysTemplate.
|
* renderingMode set to UIImageRenderingModeAlwaysTemplate.
|
||||||
*
|
*
|
||||||
* @param tintColor The color to tint the image.
|
* @param color The color to tint the image.
|
||||||
*
|
*
|
||||||
* @see <imageModificationBlock>
|
* @see <imageModificationBlock>
|
||||||
*
|
*
|
||||||
|
|||||||
@ -124,7 +124,7 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
@param imageIdentifier The identifier for the image to be fetched. May not be nil.
|
@param imageIdentifier The identifier for the image to be fetched. May not be nil.
|
||||||
@param imageURL The URL of the image to fetch. May not be nil.
|
@param imageURL The URL of the image to fetch. May not be nil.
|
||||||
@param completionBlock The block to be performed when the image has been fetched from the cache, if possible. May not be nil.
|
@param completionBlock The block to be performed when the image has been fetched from the cache, if possible. May not be nil.
|
||||||
@param image The image fetched from the cache, if any.
|
@param image The image fetched from the cache, if any.
|
||||||
@discussion This method queries both the session's in-memory and on-disk caches (with preference for the in-memory cache).
|
@discussion This method queries both the session's in-memory and on-disk caches (with preference for the in-memory cache).
|
||||||
*/
|
*/
|
||||||
- (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image))completionBlock;
|
- (void)_fetchImageWithIdentifierFromCache:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image))completionBlock;
|
||||||
@ -135,8 +135,8 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
|
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
|
||||||
@param assetURL The assets-library URL (e.g., "assets-library://identifier") of the image to load, from ALAsset. May not be nil.
|
@param assetURL The assets-library URL (e.g., "assets-library://identifier") of the image to load, from ALAsset. May not be nil.
|
||||||
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
|
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
|
||||||
@param image The image that was loaded. May be nil if no image could be downloaded.
|
@param image The image that was loaded. May be nil if no image could be downloaded.
|
||||||
@param error An error describing why the load failed, if it failed; nil otherwise.
|
@param error An error describing why the load failed, if it failed; nil otherwise.
|
||||||
*/
|
*/
|
||||||
- (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
- (void)_loadALAssetWithIdentifier:(id)imageIdentifier URL:(NSURL *)assetURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
||||||
|
|
||||||
@ -145,8 +145,8 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
|
@param imageIdentifier The identifier for the image to be loaded. May not be nil.
|
||||||
@param request The photos image request to load. May not be nil.
|
@param request The photos image request to load. May not be nil.
|
||||||
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
|
@param completionBlock The block to be performed when the image has been loaded, if possible. May not be nil.
|
||||||
@param image The image that was loaded. May be nil if no image could be downloaded.
|
@param image The image that was loaded. May be nil if no image could be downloaded.
|
||||||
@param error An error describing why the load failed, if it failed; nil otherwise.
|
@param error An error describing why the load failed, if it failed; nil otherwise.
|
||||||
*/
|
*/
|
||||||
- (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identifier:(id)imageIdentifier completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
- (void)_loadPHAssetWithRequest:(ASPhotosFrameworkImageRequest *)request identifier:(id)imageIdentifier completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
||||||
#endif
|
#endif
|
||||||
@ -155,8 +155,8 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
@param imageIdentifier The identifier for the image to be downloaded. May not be nil.
|
@param imageIdentifier The identifier for the image to be downloaded. May not be nil.
|
||||||
@param imageURL The URL of the image to downloaded. May not be nil.
|
@param imageURL The URL of the image to downloaded. May not be nil.
|
||||||
@param completionBlock The block to be performed when the image has been downloaded, if possible. May not be nil.
|
@param completionBlock The block to be performed when the image has been downloaded, if possible. May not be nil.
|
||||||
@param image The image that was downloaded. May be nil if no image could be downloaded.
|
@param image The image that was downloaded. May be nil if no image could be downloaded.
|
||||||
@param error An error describing why the download failed, if it failed; nil otherwise.
|
@param error An error describing why the download failed, if it failed; nil otherwise.
|
||||||
*/
|
*/
|
||||||
- (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
- (void)_downloadImageWithIdentifier:(id)imageIdentifier URL:(NSURL *)imageURL completion:(void (^)(UIImage *image, NSError *error))completionBlock;
|
||||||
|
|
||||||
@ -737,10 +737,13 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
completionBlock(imageFromCache);
|
completionBlock(imageFromCache);
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[_cache fetchCachedImageWithURL:imageURL callbackQueue:dispatch_get_main_queue() completion:^(CGImageRef coreGraphicsImageFromCache) {
|
[_cache fetchCachedImageWithURL:imageURL callbackQueue:dispatch_get_main_queue() completion:^(CGImageRef coreGraphicsImageFromCache) {
|
||||||
UIImage *imageFromCache = (coreGraphicsImageFromCache ? [UIImage imageWithCGImage:coreGraphicsImageFromCache] : nil);
|
UIImage *imageFromCache = (coreGraphicsImageFromCache ? [UIImage imageWithCGImage:coreGraphicsImageFromCache] : nil);
|
||||||
completionBlock(imageFromCache);
|
completionBlock(imageFromCache);
|
||||||
}];
|
}];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If we don't have a cache, just fail immediately.
|
// If we don't have a cache, just fail immediately.
|
||||||
@ -795,6 +798,8 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
|
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
|
||||||
}]];
|
}]];
|
||||||
} else {
|
} else {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[self _setDownloadIdentifier:[_downloader downloadImageWithURL:imageURL
|
[self _setDownloadIdentifier:[_downloader downloadImageWithURL:imageURL
|
||||||
callbackQueue:dispatch_get_main_queue()
|
callbackQueue:dispatch_get_main_queue()
|
||||||
downloadProgressBlock:downloadProgressBlock
|
downloadProgressBlock:downloadProgressBlock
|
||||||
@ -811,6 +816,7 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent
|
|||||||
if (strongSelf->_delegateFlags.downloadFinish)
|
if (strongSelf->_delegateFlags.downloadFinish)
|
||||||
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
|
[strongSelf->_delegate multiplexImageNode:weakSelf didFinishDownloadingImageWithIdentifier:imageIdentifier error:error];
|
||||||
}]];
|
}]];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -295,6 +295,8 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
} else {
|
} else {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
_downloadIdentifier = [_downloader downloadImageWithURL:_URL
|
_downloadIdentifier = [_downloader downloadImageWithURL:_URL
|
||||||
callbackQueue:dispatch_get_main_queue()
|
callbackQueue:dispatch_get_main_queue()
|
||||||
downloadProgressBlock:NULL
|
downloadProgressBlock:NULL
|
||||||
@ -303,6 +305,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
finished([UIImage imageWithCGImage:responseImage], error, nil);
|
finished([UIImage imageWithCGImage:responseImage], error, nil);
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -401,11 +404,14 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0};
|
|||||||
callbackQueue:dispatch_get_main_queue()
|
callbackQueue:dispatch_get_main_queue()
|
||||||
completion:cacheCompletion];
|
completion:cacheCompletion];
|
||||||
} else {
|
} else {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
[_cache fetchCachedImageWithURL:_URL
|
[_cache fetchCachedImageWithURL:_URL
|
||||||
callbackQueue:dispatch_get_main_queue()
|
callbackQueue:dispatch_get_main_queue()
|
||||||
completion:^(CGImageRef image) {
|
completion:^(CGImageRef image) {
|
||||||
cacheCompletion([UIImage imageWithCGImage:image]);
|
cacheCompletion([UIImage imageWithCGImage:image]);
|
||||||
}];
|
}];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
[self _downloadImageWithCompletion:finished];
|
[self _downloadImageWithCompletion:finished];
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
/**
|
/**
|
||||||
* Provides the constrained size range for measuring the node at the index path.
|
* Provides the constrained size range for measuring the node at the index path.
|
||||||
*
|
*
|
||||||
* @param collectionView The sender.
|
* @param pagerNode The sender.
|
||||||
*
|
*
|
||||||
* @param indexPath The index path of the node.
|
* @param indexPath The index path of the node.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
*
|
*
|
||||||
* @param dataControllerClass A controller class injected to and used to create a data controller for the table view.
|
* @param dataControllerClass A controller class injected to and used to create a data controller for the table view.
|
||||||
*
|
*
|
||||||
* @param asyncDataFetchingEnabled This option is reserved for future use, and currently a no-op.
|
* @param ownedByNode Indicates whether the tableView is owned by an ASTableNode.
|
||||||
*/
|
*/
|
||||||
- (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode;
|
- (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode;
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <AsyncDisplayKit/ASBaseDefines.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
|
|||||||
- (nullable id)downloadImageWithURL:(NSURL *)URL
|
- (nullable id)downloadImageWithURL:(NSURL *)URL
|
||||||
callbackQueue:(nullable dispatch_queue_t)callbackQueue
|
callbackQueue:(nullable dispatch_queue_t)callbackQueue
|
||||||
downloadProgressBlock:(void (^ _Nullable)(CGFloat progress))downloadProgressBlock
|
downloadProgressBlock:(void (^ _Nullable)(CGFloat progress))downloadProgressBlock
|
||||||
completion:(void (^ _Nullable)(CGImageRef _Nullable image, NSError * _Nullable error))completion;
|
completion:(void (^ _Nullable)(CGImageRef _Nullable image, NSError * _Nullable error))completion ASDISPLAYNODE_DEPRECATED;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ withDownloadIdentifier:(id)downloadIdentifier;
|
|||||||
*/
|
*/
|
||||||
- (void)fetchCachedImageWithURL:(nullable NSURL *)URL
|
- (void)fetchCachedImageWithURL:(nullable NSURL *)URL
|
||||||
callbackQueue:(nullable dispatch_queue_t)callbackQueue
|
callbackQueue:(nullable dispatch_queue_t)callbackQueue
|
||||||
completion:(void (^)(CGImageRef _Nullable imageFromCache))completion;
|
completion:(void (^)(CGImageRef _Nullable imageFromCache))completion ASDISPLAYNODE_DEPRECATED;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
*
|
*
|
||||||
* @param contentView UIView to add a (sized) node's view to.
|
* @param contentView UIView to add a (sized) node's view to.
|
||||||
*
|
*
|
||||||
* @param cellNode The cell node to be added.
|
* @param node The cell node to be added.
|
||||||
*/
|
*/
|
||||||
- (void)configureContentView:(UIView *)contentView forCellNode:(ASCellNode *)node;
|
- (void)configureContentView:(UIView *)contentView forCellNode:(ASCellNode *)node;
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,6 @@ extern NSInteger const ASDefaultTransactionPriority;
|
|||||||
/**
|
/**
|
||||||
@summary Adds a block to run on the completion of the async transaction.
|
@summary Adds a block to run on the completion of the async transaction.
|
||||||
|
|
||||||
@param queue The dispatch queue on which to execute the block.
|
|
||||||
@param completion The completion block that will be executed with the output of the execution block when all of the
|
@param completion The completion block that will be executed with the output of the execution block when all of the
|
||||||
operations in the transaction are completed. Executed and released on callbackQueue.
|
operations in the transaction are completed. Executed and released on callbackQueue.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -81,7 +81,7 @@ typedef BOOL(^asdisplaynode_iscancelled_block_t)(void);
|
|||||||
/**
|
/**
|
||||||
@summary Delegate method to draw layer contents into a CGBitmapContext. The current UIGraphics context will be set to an appropriate context.
|
@summary Delegate method to draw layer contents into a CGBitmapContext. The current UIGraphics context will be set to an appropriate context.
|
||||||
@param parameters An object describing all of the properties you need to draw. Return this from -drawParametersForAsyncLayer:
|
@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 unnecessary work. A return value of YES means cancel drawing and return.
|
@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.
|
@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.
|
||||||
*/
|
*/
|
||||||
+ (void)drawRect:(CGRect)bounds withParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing;
|
+ (void)drawRect:(CGRect)bounds withParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing;
|
||||||
@ -89,7 +89,7 @@ typedef BOOL(^asdisplaynode_iscancelled_block_t)(void);
|
|||||||
/**
|
/**
|
||||||
@summary Delegate override to provide new layer contents as a UIImage.
|
@summary Delegate override to provide new layer contents as a UIImage.
|
||||||
@param parameters An object describing all of the properties you need to draw. Return this from -drawParametersForAsyncLayer:
|
@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 unnecessary work. A return value of YES means cancel drawing and return.
|
@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 decoded before returning it here.
|
@return A UIImage with contents that are ready to display on the main thread. Make sure that the image is already decoded before returning it here.
|
||||||
*/
|
*/
|
||||||
+ (UIImage *)displayWithParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock;
|
+ (UIImage *)displayWithParameters:(id<NSObject>)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock;
|
||||||
|
|||||||
@ -42,7 +42,6 @@ ASDISPLAYNODE_INLINE CGSize ceilSizeValue(CGSize s)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@abstract Returns the bounding size for the text view's text.
|
@abstract Returns the bounding size for the text view's text.
|
||||||
@param components The TextKit components to calculate the constrained size of the text for.
|
|
||||||
@param constrainedWidth The constraining width to be used during text-sizing. Usually, this value should be the receiver's calculated size.
|
@param constrainedWidth The constraining width to be used during text-sizing. Usually, this value should be the receiver's calculated size.
|
||||||
@result A CGSize representing the bounding size for the receiver's text.
|
@result A CGSize representing the bounding size for the receiver's text.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -22,7 +22,10 @@
|
|||||||
ASBasicImageDownloader *downloader = [ASBasicImageDownloader sharedImageDownloader];
|
ASBasicImageDownloader *downloader = [ASBasicImageDownloader sharedImageDownloader];
|
||||||
|
|
||||||
NSURL *URL = [NSURL URLWithString:@"http://wrongPath/wrongResource.png"];
|
NSURL *URL = [NSURL URLWithString:@"http://wrongPath/wrongResource.png"];
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
|
||||||
__block BOOL firstDone = NO;
|
__block BOOL firstDone = NO;
|
||||||
|
|
||||||
[downloader downloadImageWithURL:URL
|
[downloader downloadImageWithURL:URL
|
||||||
@ -40,7 +43,9 @@
|
|||||||
completion:^(CGImageRef image, NSError *error) {
|
completion:^(CGImageRef image, NSError *error) {
|
||||||
secondDone = YES;
|
secondDone = YES;
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
sleep(3);
|
sleep(3);
|
||||||
XCTAssert(firstDone && secondDone, @"Not all ASBasicImageDownloader completion handlers have been called after 3 seconds");
|
XCTAssert(firstDone && secondDone, @"Not all ASBasicImageDownloader completion handlers have been called after 3 seconds");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
/**
|
/**
|
||||||
@abstract Correctly equates two objects, including cases where both objects are nil. The latter is a case where `isEqual:` fails.
|
@abstract Correctly equates two objects, including cases where both objects are nil. The latter is a case where `isEqual:` fails.
|
||||||
@param obj The first object in the comparison. Can be nil.
|
@param obj The first object in the comparison. Can be nil.
|
||||||
@param obj The second object in the comparison. Can be nil.
|
@param otherObj The second object in the comparison. Can be nil.
|
||||||
@result YES if the objects are equal, including cases where both object are nil.
|
@result YES if the objects are equal, including cases where both object are nil.
|
||||||
*/
|
*/
|
||||||
ASDISPLAYNODE_INLINE BOOL ASObjectIsEqual(id<NSObject> obj, id<NSObject> otherObj)
|
ASDISPLAYNODE_INLINE BOOL ASObjectIsEqual(id<NSObject> obj, id<NSObject> otherObj)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user