I have a custom NSSlider
.
Because of lacking space I want to show the value of it only when the user hovers over the slider. Just like this one: http://dribbble.com/shots/754412-Range-Selection
I know how the hover part works, using NSTrackingArea
.
My question is, how would I correctly make a popover like this?
I've had this question for quite a while. I guess you would use the same technique for animating single small elements over the screen outside of a window.
Use an NSWindow
. Make it borderless and non-opaque so you can define its shape through a background image. Convert coordinates so you can position the "popover" window relative to the slider. Make it a child of the window containing the slider so that weird stuff doesn't happen with the Window menu, Exposé/Mission Control, etc.