测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2018年1月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Morbix 维护。
这个 Pod 帮助您根据字符串创建简单的标签云。您可以操作文本、内边距,并可以使用 tintColor 修改标签颜色。有两个代理来处理标签的点击:关闭图标和标签触摸。您可以通过访问示例项目获取更多详细信息或与我联系。
需要 Xcode 8.0+ 和 Swift 3.0。
您的项目部署目标必须为 iOS 8.0+
对于 Swift 2.x 支持,请使用版本 1.1.0
pod 'CloudTagView', '1.1.0'
要运行示例项目,首先将仓库克隆下来,然后从 Example 目录运行 pod install
CloudTagView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod "CloudTagView"
只需要 import CloudTagView
并创建一个 CloudTagView
实例。在强条板上也适用
然后在云中添加 TagView
实例。
import CloudTagView
class ViewController: UIViewController {
let cloudView = CloudTagView()
override func viewDidLoad() {
super.viewDidLoad()
cloudView.frame = CGRectMake(0, 20, view.frame.width, 10)
view.addSubview(cloudView)
addingTags()
}
func addingTags() {
let normalTags = ["This", "is", "a", "example", "of", "Cloud", "Tag", "View"]
for s in normalTags {
cloudView.tags.append(TagView(text: s))
}
}
}
Henrique Morbin, [email protected]
CloudTagView 在 MIT 许可下提供。有关更多信息,请参阅 LICENSE 文件。