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

Add support for settings links in NSAttributedString #391

Merged
merged 3 commits into from May 28, 2013

Conversation

Projects
None yet
2 participants
@JoeSzymanski

JoeSzymanski commented May 8, 2013

Since Nimbus is already using a custom attribute to track links in the CoreText level, it seemed like a good idea to extern that attribute and update NIAttributedLabel to detect any instances of the attribute as an explicit link.

@jverkoey

View changes

Show outdated Hide outdated src/attributedlabel/src/NIAttributedLabel.m
}
}
}];
self.explicitLinkLocations = links;

This comment has been minimized.

@jverkoey

jverkoey May 8, 2013

Owner

Why is this code being duplicated? Can this be moved to a method?

@jverkoey

jverkoey May 8, 2013

Owner

Why is this code being duplicated? Can this be moved to a method?

This comment has been minimized.

@JoeSzymanski

JoeSzymanski May 8, 2013

I had it duplicated as the rest of the code for those two methods had been, but I can see that this is a bit more complicated and could be separated. I'll move that out and update the spacing to better match the existing standards.

@JoeSzymanski

JoeSzymanski May 8, 2013

I had it duplicated as the rest of the code for those two methods had been, but I can see that this is a bit more complicated and could be separated. I'll move that out and update the spacing to better match the existing standards.

@@ -96,6 +96,7 @@
* @attention NIAttributedLabel is not designed to detect html anchor tags (i.e. <a>). If
* you want to attach a URL to a given range of text you must use
* @link NIAttributedLabel::addLink:range: addLink:range:@endlink.
* You can add links to the attributed string using the attribute kNILinkAttributeName.

This comment has been minimized.

@jverkoey

jverkoey May 25, 2013

Owner

Can you explain here what the value for kNILinkAttributeName is supposed to be?

@jverkoey

jverkoey May 25, 2013

Owner

Can you explain here what the value for kNILinkAttributeName is supposed to be?

This comment has been minimized.

@JoeSzymanski

JoeSzymanski May 28, 2013

Will add an update to this shortly.

@JoeSzymanski

JoeSzymanski May 28, 2013

Will add an update to this shortly.

jverkoey added a commit that referenced this pull request May 28, 2013

Merge pull request #391 from Joe030984/master
Add support for settings links in NSAttributedString

@jverkoey jverkoey merged commit f5444e7 into jverkoey:master May 28, 2013

@jverkoey

This comment has been minimized.

Show comment
Hide comment
@jverkoey

jverkoey May 28, 2013

Owner

Awesome, thanks :)

Owner

jverkoey commented May 28, 2013

Awesome, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment