在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ElaWorkshop/TagListView开源软件地址:https://github.com/ElaWorkshop/TagListView开源编程语言:Swift 96.1%开源软件介绍:TagListViewSimple and highly customizable iOS tag list view, in Swift. Supports Storyboard, Auto Layout, and @IBDesignable. UsageThe most convenient way is to use Storyboard. Drag a view to Storyboard and set Class to You can add tag to the tag list view, or set custom font and alignment through code: tagListView.textFont = UIFont.systemFont(ofSize: 24)
tagListView.alignment = .center // possible values are [.leading, .trailing, .left, .center, .right]
tagListView.minWidth = 57
tagListView.addTag("TagListView")
tagListView.addTags(["Add", "two", "tags"])
tagListView.insertTag("This should be the second tag", at: 1)
tagListView.setTitle("New Title", at: 6) // to replace the title a tag
tagListView.removeTag("meow") // all tags with title “meow” will be removed
tagListView.removeAllTags() You can implement // ...
{
// ...
tagListView.delegate = self
// ...
}
func tagPressed(title: String, tagView: TagView, sender: TagListView) {
print("Tag pressed: \(title), \(sender)")
} You can also customize a particular tag, or set tap handler for it by manipulating the let tagView = tagListView.addTag("blue")
tagView.tagBackgroundColor = UIColor.blueColor()
tagView.onTap = { tagView in
print("Don’t tap me!")
} Be aware that if you update a property (e.g. InstallationUse CocoaPods: pod 'TagListView', '~> 1.0' Or Carthage: github "ElaWorkshop/TagListView" ~> 1.0 Or drag TagListView folder into your project. Older Swift Versions?Currently, the For Swift 4, use version 1.3.2 or swift-4 branch. For Swift 3, use version 1.2.0 or swift-3 branch. For Swift 2, use version 1.0.1 or swift-2.3 branch. For Swift 1.2, use version 0.2. ContributionPull requests are welcome! If you want to do something big, please open an issue to let me know first. LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论