UIImageView

public extension UIImageView
  • Shows the skeleton without animation using the view that calls this method as root view.

    Declaration

    Swift

    @MainActor
    func showSkeleton(symbol: UIImage? = nil,
                      usingColor color: UIColor = SkeletonAppearance.default.tintColor,
                      transition: SkeletonTransitionStyle = .crossDissolve(0.25))

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    color

    The color of the skeleton. Defaults to SkeletonAppearance.default.tintColor.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Shows the skeleton using the view that calls this method as root view.

    Declaration

    Swift

    @MainActor
    func showSkeleton(symbol: UIImage? = nil,
                      usingColor color: UIColor = SkeletonAppearance.default.tintColor,
                      animated: Bool = true,
                      delay: TimeInterval,
                      transition: SkeletonTransitionStyle = .crossDissolve(0.25))

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    color

    The color of the skeleton. Defaults to SkeletonAppearance.default.tintColor.

    animated

    If the skeleton is animated or not. Defaults to true.

    delay

    The amount of time (measured in seconds) to wait before show the skeleton.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Shows the gradient skeleton without animation using the view that calls this method as root view.

    Declaration

    Swift

    @MainActor
    func showGradientSkeleton(symbol: UIImage? = nil,
                              usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient,
                              transition: SkeletonTransitionStyle = .crossDissolve(0.25))

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    gradient

    The gradient of the skeleton. Defaults to SkeletonAppearance.default.gradient.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Shows the gradient skeleton using the view that calls this method as root view.

    Declaration

    Swift

    @MainActor
    func showGradientSkeleton(symbol: UIImage? = nil,
                              usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient,
                              animated: Bool = true,
                              delay: TimeInterval,
                              transition: SkeletonTransitionStyle = .crossDissolve(0.25)
    )

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    gradient

    The gradient of the skeleton. Defaults to SkeletonAppearance.default.gradient.

    animated

    If the skeleton is animated or not. Defaults to true.

    delay

    The amount of time (measured in seconds) to wait before show the skeleton.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Shows the animated skeleton using the view that calls this method as root view.

    If animation is nil, sliding animation will be used, with direction left to right.

    Declaration

    Swift

    @MainActor
    func showAnimatedSkeleton(symbol: UIImage? = nil,
                              usingColor color: UIColor = SkeletonAppearance.default.tintColor,
                              animation: SkeletonLayerAnimation? = nil,
                              transition: SkeletonTransitionStyle = .crossDissolve(0.25))

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    color

    The color of skeleton. Defaults to SkeletonAppearance.default.tintColor.

    animation

    The animation of the skeleton. Defaults to nil.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Shows the gradient skeleton without animation using the view that calls this method as root view.

    If animation is nil, sliding animation will be used, with direction left to right.

    Declaration

    Swift

    @MainActor
    func showAnimatedGradientSkeleton(symbol: UIImage? = nil,
                                      usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient,
                                      animation: SkeletonLayerAnimation? = nil,
                                      transition: SkeletonTransitionStyle = .crossDissolve(0.25))

    Parameters

    symbol

    The symbol of the skeleton for UIImageView. Defaults to nil.

    gradient

    The gradient of the skeleton. Defaults to SkeletonAppearance.default.gradient.

    animation

    The animation of the skeleton. Defaults to nil.

    transition

    The style of the transition when the skeleton appears. Defaults to .crossDissolve(0.25).

  • Undocumented

    Declaration

    Swift

    enum SkeletonImageAssociatedKeys
  • Add a symbol for UIImageView when show skeleton.

    Declaration

    Swift

    @MainActor
    var symbol: UIImage? { get set }
  • Symbol size proportion between 0-1.0. Default to 0.5.

    Declaration

    Swift

    @MainActor
    var symbolProportion: CGFloat { get set }