BlankSlate 是一个易于使用的 UIView 扩展,用于在视图没有内容可显示时显示空白数据集。
如果您正在使用 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,那么您应该
https://github.com/liam-i/BlankSlate.git
提示
有关详细教程,请参阅:Apple 文档
如果您正在使用 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,请将以下内容添加到您的 Cartfile
中
github "liam-i/BlankSlate" ~> 0.7.1
然后运行 carthage update --platform iOS --use-xcframeworks
。
要运行示例项目,请先克隆 repo,然后 cd
到根目录并运行 pod install
。然后在 Xcode 中打开 BlankSlate.xcworkspace。
BlankSlate 在 MIT 许可证下可用。 有关更多信息,请参见 LICENSE 文件。