What is the best way to create an NSButton with a custom background image, that is able to have variable width, without making the corner bezel look stretched? I know there are convenience methods to do this with UIButton: http://jainmarket.blogspot.com/2009/04/create-uibuttonbutton-with-images.html but I haven’t seen anything similar in NSButton.
Share
I needed to have a custom button background, here’s how I did it. I made an NSButton subclass and overrode drawrect method:
Then I could put the buttons using Interface Builder, and to get the custom graphics I just have to change the class to my new subclass.