ZSWTappableLabel icon indicating copy to clipboard operation
ZSWTappableLabel copied to clipboard

If link is in paragraph, which has setLineBreakMode == NSLineBreakByTruncatingTail than link tap is not detected

Open peterpaulis opened this issue 3 years ago • 0 comments

    // 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

peterpaulis avatar Oct 29 '20 16:10 peterpaulis