Typealiases

The following typealiases are available globally.

  • KingfisherOptionsInfo is a typealias for [KingfisherOptionsInfoItem]. You can use the enum of option item with value to control some behaviors of Kingfisher.

    Declaration

    Swift

    typealias KingfisherOptionsInfo = [KingfisherOptionsInfoItem]
  • It represents a task of retrieving image. You can call cancel on it to stop the process.

    Declaration

    Swift

    typealias RetrieveImageDiskTask = DispatchWorkItem
  • Progress update block of prefetcher.

    • skippedResources: An array of resources that are already cached before the prefetching starting.
    • failedResources: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all.
    • completedResources: An array of resources that are downloaded and cached successfully.

    Declaration

    Swift

    typealias PrefetcherProgressBlock = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void)
  • Completion block of prefetcher.

    • skippedResources: An array of resources that are already cached before the prefetching starting.
    • failedResources: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all.
    • completedResources: An array of resources that are downloaded and cached successfully.

    Declaration

    Swift

    typealias PrefetcherCompletionHandler = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void)
  • Completion block of downloader.

    Declaration

    Swift

    typealias ImageDownloaderCompletionHandler = ((_ image: Image?, _ error: NSError?, _ url: URL?, _ originalData: Data?) -> Void)
  • Progress update block of downloader.

    Declaration

    Swift

    typealias ImageDownloaderProgressBlock = DownloadProgressBlock
  • This type is used when configuring a toolbar item.

    Declaration

    Swift

    public typealias ToolbarItemClosure = (ToolbarItem) -> Void
  • This type is used when configuring a slider.

    Declaration

    Swift

    public typealias SliderConfigurationClosure = (Slider) -> Void
  • This type is used when configuring a view.

    Declaration

    Swift

    public typealias ViewConfigurationClosure = (UIView) -> Void
  • This type is used when a tool becomes active.

    Declaration

    Swift

    public typealias DidEnterToolClosure = () -> Void
  • This type is used when a tool is about to resign being active.

    Declaration

    Swift

    public typealias WillLeaveToolClosure = () -> Void
  • This type is used when configuring a button.

    Declaration

    Swift

    public typealias ButtonConfigurationClosure = (Button) -> Void