【发布时间】:2016-01-14 01:19:20
【问题描述】:
我有以下 NSString:
NSString *example = @" I like cheese and ham and eggs, but ham more than cheese and cheese more than ham!";
我想将其更改为 NSAttributable 字符串,以便我可以在 UITextView 中将其输出,其中 cheese 成为 www.cheese.com 的超链接,ham 成为 www.ham.com 的超链接
这可能吗?
马特
【问题讨论】:
-
为什么有这么多相关问题?
-
@MaxPoshusta 这个问题离这个问题还差得远。
-
如果您使用
UITextView,因为您认为这是唯一的方法,我想我应该提到可以使用UILabel 来做到这一点。
标签: ios objective-c hyperlink nsstring