ZSWTappableLabel
ZSWTappableLabel copied to clipboard
If link is in paragraph, which has setLineBreakMode == NSLineBreakByTruncatingTail than link tap is not detected
// p
{
NSMutableParagraphStyle * ps = [[NSMutableParagraphStyle alloc] init];
[ps setLineHeightMultiple:1.1];
[ps setLineBreakMode:NSLineBreakByTruncatingTail];
NSDictionary * a = @{
NSFontAttributeName: [UIFont systemFontOfSize:self.newsTitleLabel.font.pointSize],
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: ps
};
[options setAttributes:a forTagName:@"p"];
}
removing the
[ps setLineBreakMode:NSLineBreakByTruncatingTail];
makes the tap detection work again