- 此问题在此处已有答案**:
Detect UIWebView links without click(2个答案)
十小时前关门了。
我有一个简单的属性化字符串:
let string = NSAttributedString(string: "hello https://www.stackoverflow.com")
当我显示该字符串时,我希望看到:
hello URL
其中URL
是可点击链接,可打开https://www.stackoverflow.com
。
链接不是硬编码的,在我替换它的时候,我不知道有多少(如果有的话)链接存在。
- 编辑:**
看这道题,和标为重复的那道题比较一下。它不是重复的。请明智聪明地复习。
1条答案
按热度按时间vsnjm48y1#
这应该可以达到目的: