Skip to content

Instantly share code, notes, and snippets.

@stigi
Created September 1, 2011 13:34
Show Gist options
  • Select an option

  • Save stigi/1186172 to your computer and use it in GitHub Desktop.

Select an option

Save stigi/1186172 to your computer and use it in GitHub Desktop.
diff --git a/OHAttributedLabelTest/RootViewController.m b/OHAttributedLabelTest/RootViewController.m
index 13ca5ef..547d928 100644
--- a/OHAttributedLabelTest/RootViewController.m
+++ b/OHAttributedLabelTest/RootViewController.m
@@ -86,6 +86,7 @@
NSString *baseString = [self.wordList objectAtIndex:indexPath.row];
NSMutableAttributedString *attributedString = [NSMutableAttributedString attributedStringWithString:baseString];
+ [(OHAttributedLabel*)[cell viewWithTag:1337] removeAllCustomLinks];
[(OHAttributedLabel*)[cell viewWithTag:1337] setAttributedText:attributedString];
NSString *urlString = [NSString stringWithFormat:@"user://%@", baseString];
[(OHAttributedLabel*)[cell viewWithTag:1337] addCustomLink:[NSURL URLWithString:urlString] inRange:[baseString rangeOfString:baseString]];
@stigi
Copy link
Copy Markdown
Author

stigi commented Sep 2, 2011

great :)
thanks!

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