1)避免同时点击多个按钮;

    [btn setExclusiveTouch:YES];

     设置确保当btn点击时,其他按钮不响应;

 

(2)避免同时点击UITableView中多个row

-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

    if ([tableView indexPathForSelectedRow] != nil)  //如果已经选定某cell,则不允许同时选择另一Cell。

        return nil;

    else

        return indexPath;

}

相关文章:

  • 2021-12-25
  • 2022-12-23
  • 2022-01-28
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
猜你喜欢
  • 2021-07-03
  • 2021-10-10
  • 2021-11-17
  • 2022-12-23
  • 2021-05-23
相关资源
相似解决方案