【问题标题】:Attributed string 'Google' contains NSLinkAttributeName. Removed属性字符串“Google”包含 NSLinkAttributeName。已移除
【发布时间】:2015-05-25 14:34:13
【问题描述】:

我正在 Apple Watch 中开发应用程序。我正在使用标签并将文本添加为​​链接。在那个链接上,我想实现电话事件。 我正在使用以下代码。

[string addAttribute:NSLinkAttributeName
                   value:linkURL
                   range:NSMakeRange(0, string.length)];

但我收到以下错误。

Attributed string '9618194xxx' contains NSLinkAttributeName. Removed

请帮帮我

提前致谢

【问题讨论】:

  • “我遇到错误”请详细说明

标签: ios watchkit apple-watch wkinterfacelabel


【解决方案1】:

我不相信 WatchKit 支持属性字符串中的链接。由于 Watch 上没有浏览器,所以无论如何点击它都不会打开任何东西。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 1970-01-01
    • 2014-09-11
    • 1970-01-01
    • 2020-05-20
    • 2020-04-20
    • 2010-11-26
    相关资源
    最近更新 更多