有没有办法在 UITextView 等情况下更改超链接颜色,例如
.dataDetectorTypes = UIDataDetectorTypePhoneNumber;
用过吗?
提前致谢!
最佳答案
在 iOS 7 中,您可以使用 UITextView
类的 linkTextAttributes
属性更改超链接颜色。
例如:
aTextView.linkTextAttributes = @{NSForegroundColorAttributeName:[UIColor redColor]};
上述操作将导致链接显示为红色。
关于iphone - 更改 iPhone 中超链接的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1908183/