In my app I have 5 buttons. When firstButton.selected = YES;
I need others to be *.selected = NO;
. Is it a correct solution to write "NO" for other four buttons?
Here is a sample code if it's unclear what I mean:
- (IBAction)setColorRed:(id)sender {
_redColor.selected = YES;
_greenColor.selected = NO;
_blueColor.selected = NO;
_yeallowColor.selected = NO;
_clearColor.selected = NO;
}
2) second part of the question:
self.redColor setBounds:CGRectMake(0, 0, 45, 45)];
Could anyone please explain in human language why if I change those "0, 0" button does not change its position? Like when setFrame is send.
3) third part of the question:
Sender is button. How could [sender isSelected] work if it is a property of UITableViewCell? and what is the equivalent for "notSelected"?
Thanks a lot in advance..