Skip to content

Instantly share code, notes, and snippets.

@alvareztech
Created October 25, 2013 21:33
Show Gist options
  • Save alvareztech/7162180 to your computer and use it in GitHub Desktop.
Save alvareztech/7162180 to your computer and use it in GitHub Desktop.
iOS: Delegate UISwitch change state.
[yourSwitchObject addTarget:self action:@selector(setState:) forControlEvents:UIControlEventValueChanged];
- (void)setState:(id)sender {
BOOL state = [sender isOn];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment