G Glama macrumors member Original poster Feb 5, 2009 31 0 Feb 5, 2009 #1 UISwitch *whichSwitch = (UISwitch *) sender; BOOL setting = whichSwitch.isOn; [leftswitch setOn:setting animated:YES]; [rightswitch SetOn:setting animating:YES]; The last two lines especially leave me clueless.
UISwitch *whichSwitch = (UISwitch *) sender; BOOL setting = whichSwitch.isOn; [leftswitch setOn:setting animated:YES]; [rightswitch SetOn:setting animating:YES]; The last two lines especially leave me clueless.
lee1210 macrumors 68040 Jan 10, 2005 3,182 3 Dallas, TX Feb 5, 2009 #2 It looks like whatever class leftswitch and rightswitch belong to has a method called setOn:animating: that takes two BOOL values. In this case it's passing the value of setting, which will be YES or NO for setOn, and YES for animating. -Lee
It looks like whatever class leftswitch and rightswitch belong to has a method called setOn:animating: that takes two BOOL values. In this case it's passing the value of setting, which will be YES or NO for setOn, and YES for animating. -Lee
R ray648 macrumors regular Jan 10, 2008 118 0 Feb 5, 2009 #4 Objective C is case sensitive so setOn and SetOn are different. In this code it looks like its probably a typo, but watch out for this.
Objective C is case sensitive so setOn and SetOn are different. In this code it looks like its probably a typo, but watch out for this.