Unable to add New Tag
Hi,
I was try to add new tag in tagCollection, but it would not add for me.
var toTagCollection = TKCollectionView()
add(toTagCollection, toView: toEmailContainerView!) toTagCollection.delegate = self toTagCollection.action = .removeTag
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
toTagCollection.addNewTag(named: textField.text)
return true
}
Any things, I am missing here!
Hey there, sorry for the late reply. Haven't got the time yet to look into this but I'm in the process of changing exactly this flow internally (ideally the interaction should remain the same).
Also, what version are you using? Thanks
confirmed master project can not add new tag when press in to (+) tag NOTE: I downloaded master then run "pod 'TaggerKit'"
ok fixed by adding below function to tkcell
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
var view = button.hitTest(button.convert(point, from: self), with: event)
if view == nil {
view = super.hitTest(point, with: event)
}
return view
}
@fukemy can you tell me in which file i need to add this code to make it work?
@WorkspacePrateek in class extends cell bro
Tkcell.class
Well I am still learning IOS. I added this project using pod. And in Pod >> TaggerKit >> I am not able to find TKcell.class. Is it possible for me to use this workaround.
ok, just press command+shift+f, type : "Tktagcell" then find this file
@fukemy Thanks. But did not work for me. I am still not able to add New tags.
func tagIsBeingRemoved(name: String?) {
print("removed \(name!)")
self.allProfessions.addNewTag(named: name!) // <= This function does not work
self.userProfessions.removeOldTag(named: name!)
}
hmm, i think u need to know how library work first.....
Actually I need to add tag again in "allTag" if tag is removed from selectedTags