I am trying to draw some text that is clickable. I am trying not to use NSButton as my text is being drawn in drawRect and using NSButton in a drawRect makes it add the subview on top of itself unless you go through and remove all subviews on each call of drawRect.
I tried creating a NSButton and instead of adding it as a subview I am calling [myBtn.cell drawTitle: withFrame: inView:] which draws the text, but it is not clickable.
Is there a way to draw text (in a way like using drawInRect) but where I can also have the text be clickable?
If not, what would you recommend? Using a standard NSButton and clearing all the subviews each time?