Skip to content

Instantly share code, notes, and snippets.

@wess
Created December 7, 2012 20:46
Show Gist options
  • Save wess/4236368 to your computer and use it in GitHub Desktop.
Save wess/4236368 to your computer and use it in GitHub Desktop.
Link detection/getting in coretext based view
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:self];
NSString *link = [attrString urlStringForTextAtPoint:location];
if(link)
NSLog(@"LINK: %@", link);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment