Swiftpack.co - aruis/PacmanProgress as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by aruis.
aruis/PacmanProgress 1.23.1
一个像吃豆人的进度条@SwiftUI
⭐️ 1
🕓 46 weeks ago
iOS macOS
.package(url: "https://github.com/aruis/PacmanProgress.git", from: "1.23.1")

PacmanProgress

一个长得像吃豆人的进度条

使用

File > Swift Packages > Add Package Dependency: https://github.com/aruis/PacmanProgress.git

两种模式:

  • 简约模式
  • 标准模式

CleanShot-2022-06-10-15 40 53

例子

struct Demo: View {
    
    @State var progress:Float = 0
    
    var body: some View {
        VStack{
            PacmanProgress(progress: $progress,displayType: .mini(pacmanColor: .yellow,dotColor: .gray))
            
            PacmanProgress(progress: $progress,displayType: .standard(pacmanColor: .yellow,dotColor: .gray))
            Button("TEST", action: {
                progress += 0.05
            })
        }
        .frame(height: 400)
        
    }
}


GitHub

link
Stars: 1
Last commit: 46 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics