-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds SLSwitch #85
Adds SLSwitch #85
Conversation
#import "SLButton.h" | ||
|
||
#define ON YES | ||
#define OFF NO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm loathe to dump symbols with names as generic as "ON" and "OFF" into the global namespace. At the same time, it is nice to layer "off/on" semantics onto value
. What do you think about getting rid of setValue:
and just making on
readwrite? setOn:YES
would be pretty clear imo--that's how UISwitch
is set up, actually.
Hey thanks for the request @j-mutter. I really appreciate you including documentation and tests. I've made a few comments. Also, Travis doesn't yet have Xcode 5 installed, unfortunately, so the build will fail like so unless you set Thanks! |
@wearhere Done. I had been using |
Looks great! Thanks again. |
This adds an
SLSwitch
class which enables wrapsUIASwitch
'ssetValue
method, and provides a property to access the current value of the switch as a bool instead of a string.