Created
December 7, 2012 20:46
-
-
Save wess/4236368 to your computer and use it in GitHub Desktop.
Link detection/getting in coretext based view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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