New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not clickable in table view cell :( #221
Comments
Having the same issue. Were you able to resolve this? |
I have mine in UITableViewCell and CollectionViewCell and I can tell you it is very much selectable. Can you please follow the basic example in a new UITableView see if it works? Also, the version of the ActiveLabel and your Swift may help as well. |
@jeffcaljr @alkincakiralar1996 @maziyarpanahi did you find any solution ? this happens for me too , specially when tableview is registered to show context menu on longPress |
@jeffcaljr @alkincakiralar1996 @Mahan3340 |
@Mahan3340 @alkincakiralar1996 @maziyarpanahi The TableViewCell itself is clickable; the tags/urls/usernames don’t respond to tap gestures. Long-pressing the links for almost exactly 3 seconds triggers their actions though. |
@maziyarpanahi @jeffcaljr I had a gesture recognizer for dismissing keyboard on tap I managed to do it in another way so the click is fine for me now (doesn't take long time to be clicked , just like normal) and doesn't conflict with context menu long press , but Lagging still exists for non English text as I opened an issues for it . |
@jeffcaljr we do have issues open when the Cell itself is not selectable, but I don't think the tags/mentions/URLs not be clickable or taking long for action is related to UITableView. |
@Mahan3340 I follow up in your issue for other users in the future. |
@Mahan3340 how did you solve the issue? Can you please help me? |
@pawanline I'm not currently using this Lib but back then as I said above , there was an gesture recognizer that was catching all the touches to dismiss Keyboard when user was tapping around , by removing it or modifying it so that it doesn't consume the touch , the click was working again . you might have something like that in your table , test it with a simple table with cells containing just labels and see if it works for you or not . |
@Mahan3340 thank man finally I solved my issue.I have done the same mistake as you. |
I am happy this issue has been resolved. Thanks @Mahan3340 for instruction and thanks @pawanline for confirming the fix. |
In my case the solution was to add this to the custom cell class, so that the touch events are propagated down to the label: // MARK: - Pass touches events to ActiveLabel, so that tap handlers work
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.contentLabel.touchesBegan(touches, with: event)
super.touchesBegan(touches, with: event)
}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
self.contentLabel.touchesMoved(touches, with: event)
super.touchesMoved(touches, with: event)
}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
self.contentLabel.touchesEnded(touches, with: event)
super.touchesEnded(touches, with: event)
}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
self.contentLabel.touchesCancelled(touches, with: event)
super.touchesCancelled(touches, with: event)
} and use a custom form, to prevent endless delegate callings for those methods: https://github.com/Patrick-Remy/ActiveLabel.swift/tree/bugfix/endless-touches-events |
its not working do you know why it is happening ?
The text was updated successfully, but these errors were encountered: