Open aadila6 opened 4 years ago
Added the delegate, func removeButtonPressed(_ title: String, tagView: TagView, sender: TagListView) { print("UnPressed: (title)") tagView.isSelected = false tags.removeAll { $0 == title } print("Updated selected Tags (tags)") }
func tagPressed(_ title: String, tagView: TagView, sender: TagListView) {
// if(tagView.isSelected){ // print("UnPressed: (title)") // tagView.isSelected = false // tags.removeAll { $0 == title } // print("Updated selected Tags (tags)") // } print("Pressed: (title)") tagView.isSelected = true tags.append(title)
print("Updated selected Tags \(tags)") }
Can recognize select but not deselect?
Added the delegate, func removeButtonPressed(_ title: String, tagView: TagView, sender: TagListView) { print("UnPressed: (title)") tagView.isSelected = false tags.removeAll { $0 == title } print("Updated selected Tags (tags)") }
// if(tagView.isSelected){ // print("UnPressed: (title)") // tagView.isSelected = false // tags.removeAll { $0 == title } // print("Updated selected Tags (tags)") // } print("Pressed: (title)") tagView.isSelected = true tags.append(title)
Can recognize select but not deselect?