I’m sure most of you are familiar with the UISwitch
on iOS.
Is their any existing project trying to implement something like a UISwitch
for macOS and AppKit?
If not, where would one start to make one? I see them frequently and can think of so many uses.
Overview. The UISwitch class declares a property and a method to control its on/off state. When a person manipulates the switch control (“flips” it), it triggers the valueChanged event. You can customize the appearance of the switch by changing the color used to tint the switch when it's on or off.
I think you should use NSCheckBox
since it is the equivalent on a computer where you use a mouse and not your finger.
For anyone that comes across this question in the future, I have developed a UISwitch for Mac (MacToggle) Swift 3 & AutoLayout
https://github.com/RichAppz/MacToggle
It's a replica of the iOS UISwitch and fully customisable.
Enjoy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With