I have this UISwitch that I connected from my storyboard to my controller.
@property (weak, nonatomic) IBOutlet UISwitch *wantHelp;
What I am trying to do is to configure it so that the app can know when the state of the uiswitch has changed.
I looked at examples online and they show something similar to this:
-(IBAction)helpToggle:(id)sender
{
if (wantHelp.on)
{
NSLog(@"yes");
}
else
{
NSLog(@"No");
}
}
but they seem to refer to different ids like the wantHelp
or the helpToggle
and many of the examples use this kind of a heading -(IBAction)helpToggle:(id)sender
but I am confused what the "sender" is configured from and what it should be in my case.
Thanks for your help in helping me understand what to do.