ShowSomeProgress Logo

Swift 5.0 Carthage Compatible SPM

iOS 应用程序的进度指示器和活动视图

特性

当前实现的进度指示器

CircleProgressView - 一个圆形指示器

CircleProgressView

BarProgressView - 一个条形指示器

BarProgressView

可配置属性

当前实现的活动指示器

OrbitActivityIndicatorView - 在活动期间显示一个简化的行星系统

OrbitActivityIndicatorView

OrbitActivityIndicatorView2 - 在活动期间显示一个行星系统

OrbitActivityIndicatorView

OrbitActivityIndicatorView3 - 在活动期间显示追逐点系统

OrbitActivityIndicatorView

GearActivityIndicatorView - 在活动期间显示三个齿轮

GearActivityIndicatorView

可配置属性

用法

Storyboard

只需导入框架,然后像使用 UIProgressView 一样使用这些视图

import UIKit
import ShowSomeProgress

class ViewController: UIViewController {

  @IBOutlet weak var circleProgressView: CircleProgressView!

  @IBAction func setRandomValueTapped(_ sender: Any) {
    circleProgressView.progress = CGFloat(Double.random(in: 0...1))
  }
}  

示例

示例应用程序是了解 ShowSomeProgress 实际效果的最佳方式。只需打开 ShowSomeProgress.xcodeproj 并运行 Example scheme。

Example app

安装

Carthage

Carthage 是一个去中心化的依赖管理器,它可以构建您的依赖项并为您提供二进制框架。

要使用 Carthage 将 ShowSomeProgress 集成到您的 Xcode 项目中,请在您的 Cartfile 中指定它

github "stoneburner/ShowSomeProgress"

运行 carthage update 以构建框架并将构建的 ShowSomeProgress.framework 拖到您的 Xcode 项目中。

在应用程序目标的 “Build Phases” 设置选项卡上,单击“+”图标并选择“New Run Script Phase”并按照 Carthage Getting started Step 4, 5 和 6 中所述添加框架路径

Swift Package Manager

要使用 Apple 的 Swift Package Manager 进行集成,请将以下内容作为依赖项添加到您的 Package.swift

dependencies: [
    .package(url: "https://github.com/stoneburner/ShowSomeProgress.git", from: "1.0.0")
]

手动

如果您不想使用上述任何依赖管理器,您可以手动将 ShowSomeProgress 集成到您的项目中。只需将 Sources 文件夹拖到您的 Xcode 项目中。

贡献

非常欢迎大家的贡献 🙌

许可证

ShowSomeProgress
Copyright (c) 2019 ShowSomeProgress alexander@kasimir.at

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.