UITextView needs setLinkTextAttributes: (please?)
| Originator: | robotspacer | ||
| Number: | rdar://12373603 | Date Originated: | 25-Sep-2012 09:58 PM |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 6.0 (10A405) |
| Classification: | Enhancement | Reproducible: | N/A |
Summary: There's no simple way to set the link color for automatically detected links in UITextView. People are doing things like using a web view just to customize the link color, but that brings a whole new pile of problems to deal with, especially if you need the ability to toggle editing on and off. Steps to Reproduce: 1. Create a UITextView 2. Set dataDetectorTypes to UIDataDetectorTypeAll 3. Set the text to something that will turn into a link, like "http://apple.com" 4. Try to find a way to change the color of that link to anything other than bright, bright blue Expected Results: I'd expect to find something similar to the setLinkTextAttributes: method that NSTextView has. Or at the very least, in iOS 6, I would expect some way to manually look through the text attributes and change them from blue to some other color. Actual Results: There's just no easy way to do this, as far as I can tell. Regression: N/A Notes: This would make me so happy I can't even tell you.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Fixed in iOS 7.
The linkTextAttributes property was added in iOS 7.