Kingfisher Documentation

Protocol Indicator

public protocol Indicator  

An indicator type which can be used to show the download task is in progress.

Default Implementations

center​Offset

public var centerOffset: CGPoint  

Default implementation of centerOffset of Indicator. The default value is .zero, means that there is no offset for the indicator view.

size​Strategy(in:​)

public func sizeStrategy(in imageView: KFCrossPlatformImageView) -> IndicatorSizeStrategy  

Default implementation of centerOffset of Indicator. The default value is .full, means that the indicator will pin to the same height and width as the image view.

Requirements

start​Animating​View()

func startAnimatingView() 

Called when the indicator should start animating.

stop​Animating​View()

func stopAnimatingView() 

Called when the indicator should stop animating.

center​Offset

var centerOffset: CGPoint  

Center offset of the indicator. Kingfisher will use this value to determine the position of indicator in the super view.

view

var view: IndicatorView  

The indicator view which would be added to the super view.

size​Strategy(in:​)

func sizeStrategy(in imageView: KFCrossPlatformImageView) -> IndicatorSizeStrategy

The size strategy used when adding the indicator to image view.

Parameters

image​View KFCross​Platform​Image​View

The super view of indicator.