iphoneuitextviewiphone-sdk-3.0uicolor

Can I change the color of auto detected links on UITextView?


I had a UITextView that detects phone numbers and links, but this overrides my fontColor and change it to blueColor. Is there a way to format the color of auto detected links, or should I try a manual version of this function?


Solution

  • On iOS 7 you can set the tintColor of the UITextView. It affects the link color as well as the cursor line and the selected text color.

    iOS 7 also added a new property to UITextView called linkTextAttributes which would appear to let you fully control the link style.