I would like to create a toggle button in my iPhone application. However, I don\'t know exactly what would be the best approach for this.
I am considering two options.>
-(IBAction)toggle{ if (button.selected == NO) { button.selected = YES; } else { button.selected = NO; } }
or
-(IBAction)toggle:(UIButton*)sender { sender.selected = !sender.selected; }
simple dude