Reputation: 2435
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.
Upvotes: 14
Views: 6447
Reputation: 243146
I've used the Mondo Switch that's part of the Cocoa Mondo Kit. It works pretty well.
Upvotes: 6
Reputation: 884
starting with macOS 10.15 'Catalina' there is a native control for that called NSSwitch
: https://developer.apple.com/documentation/appkit/nsswitch?language=objc
Upvotes: 3
Reputation: 1529
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
Upvotes: 7
Reputation: 26883
ITSwitch
requires no images, integrates with Interface Builder and has lovely (modern) animations:
Recommended.
Upvotes: 3
Reputation: 2658
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.
Upvotes: 6
Reputation: 32873
I think you should use NSCheckBox
since it is the equivalent on a computer where you use a mouse and not your finger.
Upvotes: 15