0

I am trying to create two custom buttons in a table VIew Cell, What I want to achieve is that when One button in a specific Cell is selected only then the user should be able to select The other button in the same Cell, I tried keeping检查要选择的按钮的索引路径,但没有用.....可以在这里帮我吗??????

4

1 回答 1

0

在单元格中编写 if 语句并相互切换:

//this is for button 1
-(IBAction)buttonPressed:(UIButton *)sender{

  [sender setSelected:!sender.selected];

  if (sender.selected){
     [button2 setIsEnabled:YES];
  }
}
于 2013-10-13T16:22:13.157 回答