-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Invalid range selection for set up links #498
Comments
This might be if you're touxhing close to the link. If you're within 15 points or so of a link, it'll select. |
@getaaron is correct; there is a ~15pt tolerance around links to match |
@jhersh @getaaron , Ok, but in my case I would figure out that there were only two links created |
Does your label have link styling? If not, can you add link styling and visually verify that the word |
@jhersh , Yes, I've applied styling to the links, I've removed underline from it and also changed text color for the link. And yes, as I've specified in my question, the word "started" is also in link, I mean it calls the delegate. |
I'm not sure I am following you. Can you verify the word |
Yes, in this case entire string is become a link. |
Can you upload a sample project that demonstrates the issue? |
Sorry, still not sure I am following you. I understand that tapping the word Which of these two looks most like your label? A:
B: |
@jhersh, I want exactly A string but it gives me string with links like this. @getaaron, I'll try to upload a demo with this. |
@hemangshah We understand that tapping every word acts as a hyperlink. I am still trying to understand if the word |
Let me share some code with you.
Let me know if you need to know more. |
You have added a link to every word in your label. It sounds to me like your label is working correctly. I also tried your sample code. It does not actually assign any text to the label, so I added some to match your code; it adds a link to every word except for We probably still need to tune the link hit testing from #480 and #481, but I don't really see any problems here. |
I'm trying to set links on a string with specific range.
Here's the example:
My string looks like this:
H started tic tac toe event
(which is joining of these three strings,
H
+started
+tic tac toe event
)I'm setting links on
H
andtic tac toe event
. With following range.2015-02-06 11:40:34.210 Event[5968:38268] {0, 2} --> This is for first string i.e. H
2015-02-06 11:40:35.305 Event[5968:38268] {11, 17} --> This is for last string i.e.tic tac toe event
However when I touch on it,
- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url
would call even if I touched onstarted
word on the label. It should only call if I'll tap onH
ortic tac toe event
.What's wrong? Please help.
The text was updated successfully, but these errors were encountered: