iPhone:识别电话号码/电子邮件时如何控制 UITextView 的链接颜色?
我有一个 UITextview,里面有一个电话号码。我看到当它检测到它时,它会将标准链接变成蓝色并加下划线。我只想知道如何以编程方式控制该链接状态。
I have a UITextview that has a phone number in it. I see when it detects it it turns it the standard link blue and underlines it. I just want to know how I can control that link state programmatically.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你想阻止 UITextView 将电话号码转换为链接,你可以这样做:
If you want to keep the UITextView from converting the phone numbers to links, you can do this: