1
是否可以設置由UIDataDetectorTypes
生成的鏈接的顏色?UIDataDetectorTypes自定義鏈接顏色?
是否可以設置由UIDataDetectorTypes
生成的鏈接的顏色?UIDataDetectorTypes自定義鏈接顏色?
不幸的是沒有。
您唯一的選擇是從UITextView
繼承並覆蓋DrawRect
,這非常麻煩。
或者,您可以使用樣式表的UIWebView
。看到這個答案的細節: Can I change the color of auto detected links on UITextView? 然而這是一個相當沉重的做法。