TTTAttributedLabel “Read More >” tail truncation with several attributes possible?

核能气质少年 提交于 2019-12-05 22:35:26

I'm just answering my own question in case anyone stumbled onto it needing the same functionality.

At the time of posting the question TTTAttributedLabel only supported setting attributes on the whole truncation token string.

I added functionality for NSAttributedString support (for which you can specify ranges, which was missing from the plan NSDictionary with attributes approach) and submitted a pull request. It hasn't yet been merged into the main branch for TTTAttributedLabel, but in case anyone's in need of the same functionality you can find the PR here:

https://github.com/runmad/TTTAttributedLabel/commit/628de3f9cb688eb58fffdbb6e7ff81fa0d8b7f4a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!