NSStatusItem tooltip – change delay
-
20-03-2021 - |
Domanda
I have a NSStatusItem
to which I've added a tooltip using the setToolTip:
method.
Everything works, except that the delay before showing the tooltip seems to be about 3 seconds, which is not ideal for my application.
Is there a way to change the delay before the tooltip is shown? Ideally, I'd like the delay to be 0 (i.e., the tooltip is immediately displayed when the user hovers over the icon).
Soluzione
Try this
[[NSUserDefaults standardUserDefaults] setObject: [NSNumber numberWithInt: 1]
forKey: @"NSInitialToolTipDelay"];
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow