Last active
August 29, 2015 14:14
-
-
Save wethu/3e431c6ede936968cc7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <UIKit/UIKit.h> | |
| @interface CPControlSwitch : UISwitch { | |
| BOOL _switchState; | |
| } | |
| - (void)setSwitchState:(BOOL)switchState; | |
| - (BOOL)isSwitchState; | |
| @end | |
| @implementation MySwitch | |
| - (void)setSwitchState:(BOOL)switchState { | |
| self.on = switchState; | |
| _switchState = switchState; | |
| } | |
| - (BOOL)isSwitchState { | |
| return _switchState; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment