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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.colorThe color of the skeleton. Defaults to
SkeletonAppearance.default.tintColor.transitionThe 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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.colorThe color of the skeleton. Defaults to
SkeletonAppearance.default.tintColor.animatedIf the skeleton is animated or not. Defaults to
true.delayThe amount of time (measured in seconds) to wait before show the skeleton.
transitionThe 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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.gradientThe gradient of the skeleton. Defaults to
SkeletonAppearance.default.gradient.transitionThe 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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.gradientThe gradient of the skeleton. Defaults to
SkeletonAppearance.default.gradient.animatedIf the skeleton is animated or not. Defaults to
true.delayThe amount of time (measured in seconds) to wait before show the skeleton.
transitionThe 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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.colorThe color of skeleton. Defaults to
SkeletonAppearance.default.tintColor.animationThe animation of the skeleton. Defaults to
nil.transitionThe 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
symbolThe symbol of the skeleton for
UIImageView. Defaults tonil.gradientThe gradient of the skeleton. Defaults to
SkeletonAppearance.default.gradient.animationThe animation of the skeleton. Defaults to
nil.transitionThe style of the transition when the skeleton appears. Defaults to
.crossDissolve(0.25). -
Undocumented
Declaration
Swift
enum SkeletonImageAssociatedKeys -
Add a symbol for
UIImageViewwhen 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 }