Create informational popup / tooltip in Cocoa

前端 未结 2 1334
清酒与你
清酒与你 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];
    
    0 讨论(0)
  • 2021-02-19 10:58

    That's called a tool tip. You can set the tool tip for any NSView using setToolTip:.

    0 讨论(0)
提交回复
热议问题