Is there another way to determine if the switch is on aside from switchname.on?
Yes you can try isOn
instead of on
:
if(spawnPoints.isOn){
NSLog(@"Switch is ON");
[spawnImage setImage:[UIImage imageNamed:@"freight-spawn.png"]];
}
else{
NSLog(@"Switch is OFF");
[spawnImage setImage:[UIImage imageNamed:@"freight-none.png"]];
}
or
[spawnImage setImage:[UIImage imageNamed:spawnPoints.isOn?
@"freight-spawn.png": @"freight-none.png"]];