Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(IBAction)UserTapButtonsOption:(UIButton*)sender
- {
- UIButton *btn=(UIButton *)sender;
- NSIndexPath *indexPath=[NSIndexPath indexPathForRow:btn.tag inSection:0];
- NSLog(@"%ld%ld",(long)indexPath.row,(long)sender.tag);
- if (indexPath.row == sender.tag) {
- sender.selected=!sender.selected;
- if(sender.selected)
- {
- sender.backgroundColor = [UIColor yellowColor];
- }
- else {
- sender.backgroundColor = [UIColor redColor];
- }
- }
- else if (indexPath.row != sender.tag) {
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement