Enumerations
The following enumerations are available globally.
-
Represents a set of conception related to storage which stores a certain type of value in disk. This is a namespace for the disk storage types. A
See moreBackend
with a certainConfig
will be used to describe the storage. See these composed types for more information.Declaration
Swift
public enum DiskStorage
-
Cache type of a cached image.
- none: The image is not cached yet when retrieving it.
- memory: The image is cached in memory.
- disk: The image is cached in disk.
Declaration
Swift
public enum CacheType
-
Represents the getting image operation from the cache.
- disk: The image can be retrieved from disk cache.
- memory: The image can be retrieved memory cache.
- none: The image does not exist in the cache.
Declaration
Swift
public enum ImageCacheResult
-
Represents a set of conception related to storage which stores a certain type of value in memory. This is a namespace for the memory storage types. A
See moreBackend
with a certainConfig
will be used to describe the storage. See these composed types for more information.Declaration
Swift
public enum MemoryStorage
-
Represents the expiration strategy used in storage.
- never: The item never expires.
- seconds: The item expires after a time duration of given seconds from now.
- days: The item expires after a time duration of given days from now.
Date
The item expires after a given date.Declaration
Swift
public enum StorageExpiration
-
Represents the expiration extending strategy used in storage to after access.
- none: The item expires after the original time, without extending after access.
- cacheTime: The item expiration extends by the original cache time after each access.
- expirationTime: The item expiration extends by the provided time after each access.
Declaration
Swift
public enum ExpirationExtending
-
Represents an image setting source for Kingfisher methods.
A
Source
value indicates the way how the target image can be retrieved and cached.- network: The target image should be got from network remotely. The associated
Resource
value defines detail information like image URL and cache key. - provider: The target image should be provided in a data format. Normally, it can be an image from local storage or in any other encoding format (like Base64).
Declaration
Swift
public enum Source
- network: The target image should be got from network remotely. The associated
-
Represents all the errors which can happen in Kingfisher framework. Kingfisher related methods always throw a
See moreKingfisherError
or invoke the callback withKingfisherError
as its error type. To handle errors from Kingfisher, you switch over the error to get a reason catalog, then switch over the reason to know error detail.Declaration
Swift
public enum KingfisherError : Error
-
Represents the available option items could be used in
See moreKingfisherOptionsInfo
.Declaration
Swift
public enum KingfisherOptionsInfoItem
-
Represents image format.
- unknown: The format cannot be recognized or not supported yet.
- PNG: PNG image format.
- JPEG: JPEG image format.
- GIF: GIF image format.
Declaration
Swift
public enum ImageFormat
-
Represents an item which could be processed by an
ImageProcessor
.- image: Input image. The processor should provide a way to apply
processing on this
image
and return the result image. - data: Input data. The processor should provide a way to apply
processing on this
image
and return the result image.
Declaration
Swift
public enum ImageProcessItem
- image: Input image. The processor should provide a way to apply
processing on this
-
Represents how a size adjusts itself to fit a target size.
- none: Not scale the content.
- aspectFit: Scales the content to fit the size of the view by maintaining the aspect ratio.
- aspectFill: Scales the content to fill the size of the view.
Declaration
Swift
public enum ContentMode
-
Transition effect which will be used when an image downloaded and set by
UIImageView
extension API in Kingfisher. You can assign an enum value with transition duration as an item inKingfisherOptionsInfo
to enable the animation transition.Apple’s UIViewAnimationOptions is used under the hood. For custom transition, you should specified your own transition options, animations and completion handler as well.
- none: No animation transition.
- fade: Fade in the loaded image in a given duration.
- flipFromLeft: Flip from left transition.
- flipFromRight: Flip from right transition.
- flipFromTop: Flip from top transition.
- flipFromBottom: Flip from bottom transition.
- custom: Custom transition.
Declaration
Swift
public enum ImageTransition
-
Represents callback queue behaviors when an calling of closure be dispatched.
- asyncMain: Dispatch the calling to
DispatchQueue.main
with anasync
behavior. - currentMainOrAsync: Dispatch the calling to
DispatchQueue.main
with anasync
behavior if current queue is not.main
. Otherwise, call the closure immediately in current main queue. - untouch: Do not change the calling queue for closure.
- dispatch: Dispatches to a specified
DispatchQueue
.
Declaration
Swift
public enum CallbackQueue
- asyncMain: Dispatch the calling to
-
A value that represents either a success or failure, capturing associated values in both cases.
See moreDeclaration
Swift
public enum Result<Success, Failure>
-
Represents the activity indicator type which should be added to an image view when an image is being downloaded.
- none: No indicator.
- activity: Uses the system activity indicator.
- image: Uses an image as indicator. GIF is supported.
- custom: Uses a custom indicator. The type of associated value should conform to the
Indicator
protocol.
Declaration
Swift
public enum IndicatorType