Skip to content
This repository has been archived by the owner on Feb 7, 2020. It is now read-only.

Custom Link #118

Open
akashkamboj opened this issue Nov 5, 2014 · 10 comments
Open

Custom Link #118

akashkamboj opened this issue Nov 5, 2014 · 10 comments

Comments

@akashkamboj
Copy link

Hi I want to create a custom link i.e. following markup:

Privacy Policy (http://example.com/privacy) and Terms of Use (http://example.com/terms)

To be clear neither the link will start as @ or # or the real url. Privacy Policy will be link to http://example.com/privacy

I don't see a way in this lib or is it?

@ankushdhawan
Copy link

Hello

I am also facing same issue .do you have any solution for it.

@SebastianThiebaud
Copy link
Owner

Not sure to understand. Could you rephrase it or give me some code to digest?

@akashkamboj
Copy link
Author

I meant I want to use this component for normal hyperlinks but don't want to put @ or # or http:// url.

I want to define a phrase to a specific URL i.e.

You agree to our Privacy Policy and Terms of Use

How can I achieve that?

@SebastianThiebaud
Copy link
Owner

That's not the purpose of STTweetLabel.

Sent from my iPhone

On Nov 17, 2014, at 11:25 PM, Akash Kamboj notifications@github.com wrote:

I meant I want to use this component for normal hyperlinks but don't want to put @ or # or http:// url.

I want to define a phrase to a specific URL i.e.

You agree to our Privacy Policy and Terms of Use

How can I achieve that?


Reply to this email directly or view it on GitHub.

@filipandrei87
Copy link

+1 for this

There can be cases where you would need to highlight/add a link to another substring as well.

Why not just add another type of link (e.g. SSCustomLink) with it's own delegate method?

I see there is already a pull request offering this feature (although it uses the link types already existent).

@akashkamboj
Copy link
Author

I see that you added a label for this. Are you planning to do it? If so, can you please update the progress for it. I have this requirement in one of my current project. And right now I am using both STTweetLabel as well as OHAttributedLabel. I can use only STTweetLabel in that case.

@nordringrayhide
Copy link

+1 for this

@SebastianBoldt
Copy link

+1

@nordringrayhide
Copy link

Fellas, you'd better try https://cocoapods.org/pods/ResponsiveLabel and stop hitting the author by all this stuff ;-)

@nandodelauni
Copy link

In my fork you can find this stuff https://github.com/chicisimo/STTweetLabel

You need to call - (void)setAttributes:(NSDictionary *)attributes forCustomString:(NSString *)string and then handle the hot word STTweetCustom in your detection block.

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

No branches or pull requests

7 participants