Adding NSSwitch to Xojo
You can use it with the NSSwitchControlMBS (or DesktopNSSwitchControlMBS) control in Xojo and the view is implemented via NSSwitchMBS class. We have an action event to run when the user changes the value and a State property for code to read/write the current value.
Please try with MBS Xojo Plugins 21.1pr2 and let us know what you think. Your feedback is welcome and will help to improve this control for the next releases.