diff --git a/Sources/Shimmer/Shimmer.swift b/Sources/Shimmer/Shimmer.swift index de93ea7..3ed6755 100644 --- a/Sources/Shimmer/Shimmer.swift +++ b/Sources/Shimmer/Shimmer.swift @@ -85,7 +85,11 @@ public struct Shimmer: ViewModifier { .mask(LinearGradient(gradient: gradient, startPoint: startPoint, endPoint: endPoint)) .animation(animation, value: isInitialState) .onAppear { - isInitialState = false + // Delay the animation until the initial layout is established + // to prevent animating the appearance of the view + DispatchQueue.main.asyncAfter(deadline: .now()) { + isInitialState = false + } } } }