How can I customize UIButton/NSButton?
UIButton
You can use the
Another approach is to use a delegate of a custom CALayer that implements StyleKit drawing code) and use this custom CALayer as a sublayer of your button’s layer.
It is not recommended to subclass UIButton to customize its style.
NSButton
You can subclass NSButton or NSButonCell and override some of these methods: CALayer that implements StyleKit drawing code) and use this custom CALayer as a sublayer of your button’s layer.
Please, check out the "Example.pcvd" document, particularly the "Button" canvas in "TabBar and Button" tab in example project to see how to customize UIButton.
For implementation, take a look at the EXTabBarsAndButtonsViewController subclass.