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 Backend with a certain Config will be used to describe the storage. See these composed types for more information.

    See more

    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.
    See more

    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.
    See more

    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 Backend with a certain Config will be used to describe the storage. See these composed types for more information.

    See more

    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.
    See more

    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.
    See more

    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).
    See more

    Declaration

    Swift

    public enum Source
  • Represents all the errors which can happen in Kingfisher framework. Kingfisher related methods always throw a KingfisherError or invoke the callback with KingfisherError 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.

    See more

    Declaration

    Swift

    public enum KingfisherError : Error
    extension KingfisherError: LocalizedError
    extension KingfisherError: CustomNSError
  • Represents the available option items could be used in KingfisherOptionsInfo.

    See more

    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.
    See more

    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.
    See more

    Declaration

    Swift

    public enum ImageProcessItem
  • 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.
    See more

    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 in KingfisherOptionsInfo 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.
    See more
  • Undocumented

    See more

    Declaration

    Swift

    public enum ImageTransition
  • Represents decision of behavior on the current retry.

    See more

    Declaration

    Swift

    public enum RetryDecision
  • Represents callback queue behaviors when an calling of closure be dispatched.

    • asyncMain: Dispatch the calling to DispatchQueue.main with an async behavior.
    • currentMainOrAsync: Dispatch the calling to DispatchQueue.main with an async 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.
    See more

    Declaration

    Swift

    public enum CallbackQueue
  • A value that represents either a success or failure, capturing associated values in both cases.

    See more

    Declaration

    Swift

    public enum Result<Success, Failure>
    extension Result : CustomDebugStringConvertible
    extension Result : Equatable where Success : Equatable, Failure: Equatable
    extension Result : Hashable where Success : Hashable, Failure : Hashable
  • 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.
    See more

    Declaration

    Swift

    public enum IndicatorType
  • Undocumented

    See more

    Declaration

    Swift

    public enum IndicatorSizeStrategy