Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 276
nosedive25 Avatar asked Jan 27 '11 00:01

nosedive25


People also ask

What is use of UISwitch?

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.


2 Answers

I think you should use NSCheckBox since it is the equivalent on a computer where you use a mouse and not your finger.

like image 152
Simon Avatar answered Sep 17 '22 13:09

Simon


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

like image 30
RichAppz Avatar answered Sep 19 '22 13:09

RichAppz