2

TTTAttributedLabel を使用して、UILabel に "... Read more" を表示できます。

[lblContent setAttributedTruncationToken:str];

しかし、ユーザーがそのテキストをタップしたときに別のアクションをトリガーする必要があります。TTTAttributedLabel 内を変更しようとしましたが、うまくいきません。どうしよう?

4

1 に答える 1

0

これを試して:

label.attributedTruncationToken = NSAttributedString(string: "...Read more", attributes: [NSFontAttributeName : label.font, NSForegroundColorAttributeName : UIColor.blueColor()])
于 2016-09-22T17:19:43.823 に答える