Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

展开点击无效果 #34

Open
Mr-WaterMelon-China opened this issue Apr 30, 2019 · 2 comments
Open

展开点击无效果 #34

Mr-WaterMelon-China opened this issue Apr 30, 2019 · 2 comments

Comments

@Mr-WaterMelon-China
Copy link

你好,下载了你的demo运行,如果我首先设置label的行数,再点击展开就无效果, 这是为什么呢?在demo的第0组我是这样设置的
cell.testTapLabel.numberOfLines = 2;
cell.testTapLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
然后展开就无响应了

@lyb5834
Copy link
Owner

lyb5834 commented May 15, 2019

文本必须全部显示完才能准确响应事件,这种大范围缺省的,省略号后的文字不可能计算出来坐标的

@ZihenMo
Copy link

ZihenMo commented Dec 23, 2020

经测试,需要为所有字符串加上富文本属性,不能仅设置事件文本而忽略其他文本的设置。

    [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];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants