Update some comments to allows SwiftDocC generate better page
This commit is contained in:
parent
5c14e73f70
commit
82793d27bf
|
@ -107,8 +107,26 @@
|
|||
|
||||
// By default, animated image frames are returned by decoding just in time without keeping into memory. But you can choose to preload them into memory as well, See the description in `SDAnimatedImage` protocol.
|
||||
// After preloaded, there is no huge difference on performance between this and UIImage's `animatedImageWithImages:duration:`. But UIImage's animation have some issues such like blanking and pausing during segue when using in `UIImageView`. It's recommend to use only if need.
|
||||
/**
|
||||
Pre-load all animated image frame into memory. Then later frame image request can directly return the frame for index without decoding.
|
||||
This method may be called on background thread.
|
||||
|
||||
@note If one image instance is shared by lots of imageViews, the CPU performance for large animated image will drop down because the request frame index will be random (not in order) and the decoder should take extra effort to keep it re-entrant. You can use this to reduce CPU usage if need. Attention this will consume more memory usage.
|
||||
*/
|
||||
- (void)preloadAllFrames;
|
||||
|
||||
/**
|
||||
Unload all animated image frame from memory if are already pre-loaded. Then later frame image request need decoding. You can use this to free up the memory usage if need.
|
||||
*/
|
||||
- (void)unloadAllFrames;
|
||||
/**
|
||||
Returns a Boolean value indicating whether all animated image frames are already pre-loaded into memory.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly, getter=isAllFramesLoaded) BOOL allFramesLoaded;
|
||||
/**
|
||||
Return the animated image coder if the image is created with `initWithAnimatedCoder:scale:` method.
|
||||
@note We use this with animated coder which conforms to `SDProgressiveImageCoder` for progressive animation decoding.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) id<SDAnimatedImageCoder> animatedCoder;
|
||||
|
||||
@end
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "SDImageCoder.h"
|
||||
|
||||
/// Animated image playback mode
|
||||
typedef NS_ENUM(NSUInteger, SDAnimatedImagePlaybackMode) {
|
||||
/**
|
||||
* From first to last frame and stop or next loop.
|
||||
|
|
|
@ -17,11 +17,17 @@
|
|||
For others (macOS/watchOS or iOS/tvOS 10-), these method use the `SDImageGraphics.h` to implements the same behavior (but without dynamic bitmap support)
|
||||
*/
|
||||
|
||||
/// A closure for drawing an image.
|
||||
typedef void (^SDGraphicsImageDrawingActions)(CGContextRef _Nonnull context);
|
||||
/// Constants that specify the color range of the image renderer context.
|
||||
typedef NS_ENUM(NSInteger, SDGraphicsImageRendererFormatRange) {
|
||||
/// The image renderer context doesn’t specify a color range.
|
||||
SDGraphicsImageRendererFormatRangeUnspecified = -1,
|
||||
/// The system automatically chooses the image renderer context’s pixel format according to the color range of its content.
|
||||
SDGraphicsImageRendererFormatRangeAutomatic = 0,
|
||||
/// The image renderer context supports wide color.
|
||||
SDGraphicsImageRendererFormatRangeExtended,
|
||||
/// The image renderer context doesn’t support extended colors.
|
||||
SDGraphicsImageRendererFormatRangeStandard
|
||||
};
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "SDImageFrame.h"
|
||||
|
||||
/// The options controls how we force pre-draw the image (to avoid lazy-decoding). Which need OS's framework compatibility
|
||||
typedef NS_ENUM(NSUInteger, SDImageCoderDecodeSolution) {
|
||||
/// automatically choose the solution based on image format, hardware, OS version. This keep balance for compatibility and performance. Default after SDWebImage 5.13.0
|
||||
SDImageCoderDecodeSolutionAutomatic,
|
||||
|
|
|
@ -95,9 +95,13 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) {
|
|||
SDWebImageDownloaderMatchAnimatedImageClass = 1 << 12,
|
||||
};
|
||||
|
||||
/// Posed when URLSessionTask started (`resume` called))
|
||||
FOUNDATION_EXPORT NSNotificationName _Nonnull const SDWebImageDownloadStartNotification;
|
||||
/// Posed when URLSessionTask get HTTP response (`didReceiveResponse:completionHandler:` called)
|
||||
FOUNDATION_EXPORT NSNotificationName _Nonnull const SDWebImageDownloadReceiveResponseNotification;
|
||||
/// Posed when URLSessionTask stoped (`didCompleteWithError:` with error or `cancel` called)
|
||||
FOUNDATION_EXPORT NSNotificationName _Nonnull const SDWebImageDownloadStopNotification;
|
||||
/// Posed when URLSessionTask finished with success (`didCompleteWithError:` without error)
|
||||
FOUNDATION_EXPORT NSNotificationName _Nonnull const SDWebImageDownloadFinishNotification;
|
||||
|
||||
typedef SDImageLoaderProgressBlock SDWebImageDownloaderProgressBlock;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/// An error domain represent SDWebImage loading system with custom codes
|
||||
FOUNDATION_EXPORT NSErrorDomain const _Nonnull SDWebImageErrorDomain;
|
||||
|
||||
/// The response instance for invalid download response (NSURLResponse *)
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/// The scale mode to apply when image drawing on a container with different sizes.
|
||||
typedef NS_ENUM(NSUInteger, SDImageScaleMode) {
|
||||
/// The option to scale the content to fit the size of itself by changing the aspect ratio of the content if necessary.
|
||||
SDImageScaleModeFill = 0,
|
||||
/// The option to scale the content to fit the size of the view by maintaining the aspect ratio. Any remaining area of the view’s bounds is transparent.
|
||||
SDImageScaleModeAspectFit = 1,
|
||||
/// The option to scale the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.
|
||||
SDImageScaleModeAspectFill = 2
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue