Indicator

@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public struct Indicator<T> where T : View

A type to build the indicator

  • Create a indicator with builder

    Declaration

    Swift

    public init(@ViewBuilder content: @escaping (_ isAnimating: Binding<Bool>, _ progress: Binding<Double>) -> T)

    Parameters

    builder

    A builder to build indicator

    isAnimating

    A Binding to control the animation. If image is during loading, the value is true, else (like start loading) the value is false.

    progress

    A Binding to control the progress during loading. Value between [0.0, 1.0]. If no progress can be reported, the value is 0. Associate a indicator when loading image with url

Available where T == ActivityIndicator

Available where T == ProgressIndicator