Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Glama

macrumors member
Original poster
Feb 5, 2009
31
0
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
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
 

ray648

macrumors regular
Jan 10, 2008
118
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.