Create informational popup / tooltip in Cocoa

前端 未结 2 1337
清酒与你
清酒与你 2021-02-19 10:45

The question title is kind of vague, but I really don\'t know what the thing is called.

\"\"

I am trying to

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 10:54

    If you are using NSTextView, you can even set an attribute for a certain range in NSTextstorage, that displays the Tooltip. Something like:

    [textStorage addAttribute:NSToolTipAttributeName
                        value:error.description
                        range:range];
    

提交回复
热议问题