YBAttributeTextTapAction
YBAttributeTextTapAction copied to clipboard
展开点击无效果
你好,下载了你的demo运行,如果我首先设置label的行数,再点击展开就无效果, 这是为什么呢?在demo的第0组我是这样设置的 cell.testTapLabel.numberOfLines = 2; cell.testTapLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; 然后展开就无响应了
文本必须全部显示完才能准确响应事件,这种大范围缺省的,省略号后的文字不可能计算出来坐标的
经测试,需要为所有字符串加上富文本属性,不能仅设置事件文本而忽略其他文本的设置。
[allText addAttributes:@{
NSFontAttributeName: [UIFont systemFontOfSize:12.f],
NSForegroundColorAttributeName: UIColor.textColor97
} range:normalRange];
[allText addAttributes:@{
NSForegroundColorAttributeName: UIColor.themColor,
NSFontAttributeName: [UIFont systemFontOfSize:12.f],
NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle)
} range:viewDetailRange];