✨Spinner
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
SwiftUI ⟩ Animations ⟩ examples ⟩
⭐️ 注意:
當旋轉螢幕的時候,使用 implicit animation 的 Spinner 會產生奇怪的「飄移」,但 explicit animation 則不會❗️
📗 參考:Thinking in SwiftUI, Ch. 6: Animations (p.113)
import SwiftUI
// implicit animation
struct Spinner: View {
// ⭐️ view state
@State private var animating = false
var body: some View {