NSAttributedString in NSTextView

Discussion in 'Mac Programming' started by Monaj, Jul 17, 2009.

  1. Monaj macrumors regular

    May 24, 2009
    I am trying to display an NSAttributedString in a NSTextView object by using this method:
    [textViewobject insertText:attributedString];

    but it is not displaying anything :eek:

    Can anyone suggest me how to accomplish it?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    From the docs:
    This method is the entry point for inserting text typed by the user and is generally not suitable for other purposes.​

    I'd suggest using the associated NSTextStorage object instead which you can get via textStorage.

Share This Page