Q: How can i put multiple touch like facebook title in UILabel/UITextView? I want to make UILabel like facebook's title.
Thing I want to do is multiple touch in UILabel or UITextView. What should I use?
How can I make like this http://tool.keepitreal.jp/screen.png ?
In this case, each names go to different pages if you touch.
    NSString* parts = @"this is test. you know?";

    NSError *error = nil;
    NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:@"test" options:0 error:&error];
    if (error == nil) {
        NSArray *res = [regexp matchesInString:parts.string options:0 range:NSMakeRange(0, parts.length)];
        for (NSTextCheckingResult *match in res) {
            // change color
            [parts addAttribute:NSForegroundColorAttributeName
                            value:[UIColor redColor]
                          range:[match rangeAtIndex:0]];
        }
    }


A: Just set tap gesture on UITextView and in the event-handler method:
CGPoint location = [gestureRecognizer locationInView:theTextView];
UITextPosition *tapPos = [self.textViewBelowPopup closestPositionToPoint:location];
UITextRange *wr = [self.textViewBelowPopup.tokenizer rangeEnclosingPosition:tapPos withGranularity:UITextGranularityWord inDirection:UITextLayoutDirectionRight];
NSString *word = [self.textViewBelowPopup textInRange:wr];

You got the word compare it and show it on appropriate screen/page.

A: Naohide,
Its not possible to assign two tap gesture at different position on one control. Either you use two controls where one is normal text and other is attributed text and then assign the tap gesture.
Have a blessed day ahead 
