SwiftUI 中五彩纸屑视图的概念证明
五彩纸屑演示
这是 SwiftUI 中五彩纸屑视图的概念证明。我正在我的应用程序Personal Best和Taylor's Version的生产中使用它。它以 60fps(在支持 ProMotion 的设备上为 120fps)平稳运行,并包括触觉反馈。
演示
The main interface is a extension, which allows confetti to be attached to any view:View
Text("Hello world")
.withConfetti(isVisible: $confettiVisible)
See for where it’s used.ContentView.swift