KILabel icon indicating copy to clipboard operation
KILabel copied to clipboard

tap handlers not responding.

Open ismyhc opened this issue 9 years ago • 2 comments

I cannot seem to get the tap handlers to work. Ive tried hashtag and url link handlers. I see the link highlight when touching, but code within handler not getting called.

self.cardDescriptionLabel.userInteractionEnabled = true
self.cardDescriptionLabel.urlLinkTapHandler = { label, url, range in
    print("Test")   
}

ismyhc avatar Nov 30 '15 20:11 ismyhc

Me too, tha same problem,

if (self.photoToVote.owner.type == ProfileTypeBlogger) {
        lblUserQuestion.automaticLinkDetectionEnabled = YES;
        lblUserQuestion.urlLinkTapHandler             = ^(KILabel *lblUserQuestion, NSString *string, NSRange range) {
            [self attemptOpenURL:[NSURL URLWithString:string]];
            NSLog(@"URL tapped %@", string);
        };
    }

Viniciuscarvalho avatar Apr 27 '16 01:04 Viniciuscarvalho

Same happening with me.

 // Attach a block to be called when the user taps a URL
            self.lTitleText.urlLinkTapHandler = { label, url, range in
                NSLog("URL \(url) tapped")
                print("clicked label \(label) Url \(url) Range \(range)");
            }

sandeeprana011 avatar Dec 06 '17 04:12 sandeeprana011