Closed hardikamal closed 5 years ago
You can select a single tag with long press.
@hardikamal I don't think it's possible at the moment with the library. I had similar requirements in my code and I ended up deselecting other tags when one tag is being selected.
mytag.onTap = {tapView in // unselect other tags }
@hardikamal user this
func tagPressed(_ title: String, tagView: TagView, sender: TagListView) {
print("Tag pressed: \(title), \(sender)")
for ta in sender.tagViews {
if ta.titleLabel?.text == title {
ta.isSelected = !ta.isSelected
}else{
ta.isSelected = false
}
}
}
Hi,
Is it possible to set only one tag selected at a time? ie I want the tags to act like radiobutton.