KILabel
KILabel copied to clipboard
tap handlers not responding.
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")
}
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);
};
}
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)");
}