This is about OSX - iOS is irrelevant to me. I have created an NSButton in InterfaceBuilder and set its bezel to "Radio". The button is not checked by default. In my application I can check it of course but when clicking it again it won't be unchecked - as radio buttons usually aren't.
Now my question is is it possible to get the NSButton with a bezel of "Radio" which seems to fix the type to "Radio", too to act like it's type was "Switch" instead (the type "Switch" can't be selected when the bezel is "Radio" so I assume this will have to done by code).
The question is not if this makes sense to do :-) It is if it can be done and by what means.
EDIT : When selecting bevel "Radio" and then setting type to "Push On Push Off" or "On Off" in Interface Builder the bezel switches to "Bevel" for the button but the radio button appearance stays nonetheless as long as one does these changes in that order and touches nothing else afterwards. The button works as on / off, too.
However there is one difference to the original "Radio" bezel I try to get. I am using this button in an NSBox and I can't get it not to draw the window's background color when set to type "Push On Push Off". Here is a screen shot of the problem:
The lower element is bevel "Radio" / type "Radio" and the upper one was switched to type "Push On Push Off" like detailed above. Can I make that window-colored square go away somehow or is there a different approach to this?
EDIT 2: I tried creating an IBOutlet for the according NSButtonCell and then to use:
[myButtonCell setBackgroundColor:[NSColor clearColor]];
If you want to have
NSSwitchButton behavior for a button that looks like an
NSRadioButton, then you can
setAlternateImage: of the
NSSwitchButton to the
alternateImage of a dummy