Chameleon icon indicating copy to clipboard operation
Chameleon copied to clipboard

UISwitch unimplemented

Open robertchin opened this issue 13 years ago • 4 comments

UISwitch is not implemented. Do you want to use my implementation of RCSwitch? If you pull in some of my classes, you can create a UISwitch subclass of RCSwitchOnOff, and it should work pretty well.

https://github.com/robertchin/rcswitch/blob/master/Classes/RCSwitchOnOff.m

robertchin avatar Mar 24 '11 06:03 robertchin

Here's another implementation of UISwitch, we should compare and decide for the best one.

https://github.com/samsoffes/sstoolkit/blob/master/SSToolkit/SSSwitch.h

steipete avatar Mar 24 '11 09:03 steipete

I'll probably get attacked for saying this...but should UISwitch to fall through to a checkbox? Switches really shouldn't be used on OS X unless they control a background process or large service (see: Time Machine, and Server Preferences). Checkboxes are the native way to control boolean values, and making your preferences in an OS X app with switches would make it feel ported.

CarterA avatar Mar 25 '11 01:03 CarterA

Hmm, that's more of a approach thing. I guess there is space for both options, some people will prefer a more complete port, others a simple checkbox. I'd aim for maximum portability, and would add a checkbox-wrapper als one of the AppKit-Extensions.

steipete avatar Mar 25 '11 02:03 steipete

UINSCellControl was recently added so that AppKit NSCells (such as checkbox) could be used directly if so desired. I think we should implement UISwitch as it is in iOS. Applications wishing to use a more native look for switches could do things another way (in Twitterrific, we went with an all-native prefs window) or use the NSCell wrapper. Additionally, Facetime for OS X uses on/off switches in its preferences UI so even Apple is trying them out on the desktop.

BigZaphod avatar Mar 25 '11 03:03 BigZaphod