1

I have an NSTextView that i assign an array of single words to be its string :

outputTextview.string? = respArray.joinWithSeparator(" ")

What i want to do is: i want to add an action to be executed as the user clicks on one of the words in the text view to do some changes to the clicked word.

or is it possible to assign each word in the array to an object that gets added to the text view and recognizes click (I'm not sure this would work cause i at the end i want the objects in textview to be selectable as a sentence an be copyable as text).

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • The technic is the same as for UIKit's analogue http://stackoverflow.com/questions/19332283/detecting-taps-on-attributed-text-in-a-uitextview-in-ios – Daniyar Aug 22 '16 at 11:56

0 Answers0