UISwitch, something similar for Mac?
Question
Im sure most of you are familiar with the UISwitch
on iOS. Is their any existing project trying to implement something like this on Mac? If not, where would one start to make one? I see them frequently and can think of so many uses.
Thanks in advance
Solution
I've used the Mondo Switch that's part of the Cocoa Mondo Kit. It works pretty well.
OTHER TIPS
I think you should use NSCheckBox
since it is the equivalent on a computer where you use a mouse and not your finger.
I recently extended Peter Hosey's PRHOnOffButton to add iOS-like background colors and labels. Since mine is derived, it may or may not have the same caveat described above by Peter.
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
You could use Peter Hosey’s PRHOnOffButton.
ITSwitch
requires no images, integrates with Interface Builder and has lovely (modern) animations:
Recommended.
starting with macOS 10.15 'Catalina' there is a native control for that called 'NSSwitch': https://developer.apple.com/documentation/appkit/nsswitch?language=objc