nosedive25
nosedive25

Reputation: 2435

UISwitch, something similar for Mac?

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

Answers (7)

Dave DeLong
Dave DeLong

Reputation: 243146

I've used the Mondo Switch that's part of the Cocoa Mondo Kit. It works pretty well.

Upvotes: 6

user1259710
user1259710

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

RichAppz
RichAppz

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

enter image description here

It's a replica of the iOS UISwitch and fully customisable.

Enjoy

Upvotes: 7

mxcl
mxcl

Reputation: 26883

ITSwitch requires no images, integrates with Interface Builder and has lovely (modern) animations:

https://github.com/iluuu1994/ITSwitch

Recommended.

Upvotes: 3

DK_
DK_

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.

enter image description here

Upvotes: 6

user557219
user557219

Reputation:

You could use Peter Hosey’s PRHOnOffButton.

Upvotes: 5

Simon
Simon

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

Related Questions