Skip to content
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

touchesEnded and thus handleLinkTapped are never executed #79

Open
kevinrenskers opened this issue May 26, 2021 · 2 comments
Open

touchesEnded and thus handleLinkTapped are never executed #79

kevinrenskers opened this issue May 26, 2021 · 2 comments

Comments

@kevinrenskers
Copy link

I'm not sure why, but in my project the didSelectLink delegate method is never called. It seems that the root cause is that touchesEnded is also never called inside of NantesLabel, only touchesBegan and touchesCancelled.

In my case the label is used within a UIStackView within a UITableViewCell, auto-sizing everything. I set myLabel.attributedText to an instance of NSAttributedString with the .foregroundColor and .font attributes set, and links are added the old-fashioned way via NSMutableAttributedString's addAttribute. The links are styled just fine (via linkAttributes), so they are definitely recognized. Also within touchesBegan I can see that it does find the link and sets activeLink. But.. touchesEnded is never called, so handleLinkTapped is also never executed.

I'm not sure how easy it's going to be to make a minimum reproducible project 😰
But I'll see what I can do!

@kevinrenskers
Copy link
Author

As I feared, a minimum project works just fine. I think it's going to be extremely difficult to pinpoint where in my project this bug gets introduced.

@kevinrenskers
Copy link
Author

I actually have the same problem with TTTAttributedLabel. Very weird. I'll dig deeper tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant