How do the switches work in XCode4? how do i check which properties are available to me for the switches?
i am trying to check the state of a switch and make a label change according to the state. Something like this:
-(IBAction)clickedOnSwitch:(id)sender {
NSString *switchState = [[NSString alloc]init];
if (mySwitchIsOn) {
switchState = @"switch is On";
}
else
{
switchState = @"switch is Off";
}
myLabel.text = switchState;
[switchState release];
}
Take a look at the UISwitch class reference either on the web or in the Xcode documentation browser.