We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c632ed + 4290558 commit 5659a62Copy full SHA for 5659a62
Sources/Shimmer/Shimmer.swift
@@ -85,7 +85,11 @@ public struct Shimmer: ViewModifier {
85
.mask(LinearGradient(gradient: gradient, startPoint: startPoint, endPoint: endPoint))
86
.animation(animation, value: isInitialState)
87
.onAppear {
88
- isInitialState = false
+ // Delay the animation until the initial layout is established
89
+ // to prevent animating the appearance of the view
90
+ DispatchQueue.main.asyncAfter(deadline: .now()) {
91
+ isInitialState = false
92
+ }
93
}
94
95
0 commit comments