iPhone 为 UILabel 子字符串着色
我正在解析 twitter rss feed,我只需要显示推文,所以我不需要 MGTwitterEngine。 我已经设置好了,这样我就可以看到完整的推文,这是我唯一希望它为主题标签和网址着色的东西。
所以我需要将字符串分割成不同的子字符串,对主题标签和网址进行着色,然后将其粘合在各种 UILabels 中
是否有更简单的方法来完成此操作? 简而言之,我需要字符串的某些部分的颜色与其他部分不同。
I’m parsing a twitter rss feed, and I just need to show tweets, so I don't need MGTwitterEngine.
I have already set it up so I can see the complete tweet, the only thing I want it to colorize hashtags and urls.
So I would need to slice up the string in different substrings, colorize the hashtags and urls and glue it together in various UILabels
Is there an easier way to accomplish this?
In short I need some parts of a string colored differently than others.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题应该回答您的问题: iphone-uilabel -同时包含多种字体的文本
This question should answer your question: iphone-uilabel-containing-text-with-multiple-fonts-at-the-same-time