BlankSlate

Swift Platforms CocoaPods SPM Carthage License

BlankSlate 是一个易于使用的 UIView 扩展,用于在视图没有内容可显示时显示空白数据集。

屏幕截图

要求

安装

Swift Package Manager

...使用 swift build

如果您正在使用 Swift Package Manager,请将依赖项添加到您的 Package.swift 文件,并将 BlankSlate 库导入到所需的目标中

dependencies: [
    .package(url: "https://github.com/liam-i/BlankSlate.git", from: "0.7.1")
],
targets: [
    .target(
        name: "MyTarget", dependencies: [
            .product(name: "BlankSlate", package: "BlankSlate")
        ])
]

...使用 Xcode

如果您正在使用 Xcode,那么您应该

提示

有关详细教程,请参阅:Apple 文档

CocoaPods

如果您正在使用 CocoaPods,请将以下内容添加到您的 Podfile

source 'https://github.com/CocoaPods/Specs.git'
# Or use CND source
# source 'https://cdn.cocoapods.org/'
platform :ios, '12.0'
use_frameworks!

target 'MyApp' do
  pod 'BlankSlate', '~> 0.7.1'
end

然后运行 pod install

重要

需要 CocoaPods 1.13.0 或更高版本。

Carthage

如果您正在使用 Carthage,请将以下内容添加到您的 Cartfile

github "liam-i/BlankSlate" ~> 0.7.1

然后运行 carthage update --platform iOS --use-xcframeworks

示例

要运行示例项目,请先克隆 repo,然后 cd 到根目录并运行 pod install。然后在 Xcode 中打开 BlankSlate.xcworkspace。

鸣谢和感谢

许可证

BlankSlate 在 MIT 许可证下可用。 有关更多信息,请参见 LICENSE 文件。