SwiftStepProgress 0.0.1

SwiftStepProgress 0.0.1

Ciprian Redinciuc 维护。



SwiftStepProgressView

Platforms License

Swift Package Manager Carthage compatible CocoaPods compatible

Travis SwiftFrameworkTemplate

用 Swift 编写的进度步进视图

SwiftStepProgress

要求

  • iOS 8.0+
  • Xcode 10.0+

安装

依赖管理器

CocoaPods

CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它

$ gem install cocoapods

要在 CocoaPods 中集成 SwiftStepProgressView 至您的 Xcode 项目,请在您的 Podfile 中指定它

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'SwiftStepProgressView', '~> 0.0.1'

然后,运行以下命令

$ pod install
Carthage

Carthage 是一个去中心化的依赖管理器,它自动执行将框架添加到您的 Cocoa 应用程序的过程。

您可以使用以下命令使用 Homebrew 安装 Carthage

$ brew update
$ brew install carthage

要在 Carthage 中集成 SwiftStepProgressView 至您的 Xcode 项目,请在您的 Cartfile 中指定它

github "cyupa/SwiftStepProgressView" ~> 0.0.1
Swift 包管理器

要使用 SwiftStepProgressView 作为 Swift 包管理器 包,只需在您的 Package.swift 文件中添加以下内容。

// swift-tools-version:4.2

import PackageDescription

let package = Package(
    name: "HelloSwiftStepProgressView",
    dependencies: [
        .package(url: "https://github.com/cyupa/SwiftStepProgressView.git", .upToNextMajor(from: "0.0.1"))
    ],
    targets: [
        .target(name: "HelloSwiftStepProgressView", dependencies: ["SwiftStepProgressView"])
    ]
)

手动

如果您不想使用上述任一依赖项管理器,您可以手动将SwiftStepProgressView集成到您的项目中。

Git 子模块

  • 打开终端,cd 到您的顶级项目目录,运行以下命令 "if" 您的项目不是作为 git 仓库初始化
$ git init
  • 运行以下命令将 SwiftStepProgressView 作为 git 子模块 添加
$ git submodule add https://github.com/cyupa/SwiftStepProgressView.git
$ git submodule update --init --recursive
  • 打开新的 SwiftStepProgressView 文件夹,并将 SwiftStepProgressView.xcodeproj 拖拽到您的应用的 Xcode 项目的项目导航器中。

    它应该位于您的应用蓝色项目图标之下。它位于所有其他 Xcode 组的上方或下方无关紧要。

  • 在项目导航器中选择 SwiftStepProgressView.xcodeproj,并验证部署目标与您的应用目标相匹配。

  • 接下来,在项目导航器中(蓝色项目图标)选择您应用项目,导航到目标配置窗口,并在侧边栏的 "Targets" 菜单下选择应用目标。

  • 在窗口顶部的选项卡栏中,打开 "General" 面板。

  • 在 "Embedded Binaries" 部分下单击 + 按钮。

  • 您将看到两个不同的 SwiftStepProgressView.xcodeproj 文件夹,每个文件夹中都有两个不同版本的 SwiftStepProgressView.framework,嵌套在 Products 文件夹中。

    您选择哪个 Products 文件夹都无关紧要。

  • 选择 SwiftStepProgressView.framework

  • 就这样!

SwiftStepProgressView.framework 将自动作为目标依赖项、链接框架和嵌入框架添加到复制文件构建阶段,这就是您在模拟器和设备上需要构建所有内容的所有内容。

嵌入的二进制文件

  • https://github.com/cyupa/SwiftStepProgressView/releases下载最新发布版本
  • 接下来,在项目导航器中(蓝色项目图标)选择您应用项目,导航到目标配置窗口,并在侧边栏的 "Targets" 菜单下选择应用目标。
  • 在窗口顶部的选项卡栏中,打开 "General" 面板。
  • 在 "Embedded Binaries" 部分下单击 + 按钮。
  • 添加下载的 SwiftStepProgressView.framework
  • 就这样!

使用

贡献

欢迎提交问题或拉取请求!

作者

伊皮安·雷丁丘克 @cyupa89

许可

SwiftStepProgressView在MIT许可下发布。请参阅LICENSE以获取详细信息。