0

I have read a lot of posts about this yet, but I didn't get to a good result. I would like to, for example, have a UIDetectorType for Hashtags in a UITextView.

Isn't there a way to subclass to accomplish this? It seems odd of apple to just have these detector types and no customization(as they even have a twitter-keyboard in the SDK).

Is there an approach but laying buttons over the text where it's necessary?

user2071152
  • 1,161
  • 1
  • 11
  • 25
user1710004
  • 209
  • 1
  • 4
  • 12
  • I'd suggest to detect hastags (with a `NSRegularExpression`), using `NSAttributedString`, put a `NSLinkAttributeName` and custom the rending. – Larme Apr 25 '14 at 09:57
  • Good Idea! Didn't know of NSLinkAttributeName. Seems like this is new in iOS 7. Thanks. – user1710004 Apr 25 '14 at 10:13

1 Answers1

0

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

Wasim Akram
  • 51
  • 2
  • 9