美文网首页
iOS:获取cell上的按钮点击所在的indexPath

iOS:获取cell上的按钮点击所在的indexPath

作者: LeeQg666等ing | 来源:发表于2019-06-20 17:07 被阅读0次
    [cell.btnFreeBankCard addTarget:self action:@selector(unbundleBankCard:event:) forControlEvents:UIControlEventTouchUpInside];
    
    /**
     标记标签
    
     @param sender 发送者
     */
    - (void)unbundleBankCard:(UIButton *)sender event:(UIEvent *)event
    {
        NSSet *touches = [event allTouches];
        UITouch *touch = [touches anyObject];
        CGPoint currentTouchPosition = [touch locationInView:self.tableBankCardList];
        NSIndexPath *indexPath =[self.tableBankCardList indexPathForRowAtPoint:currentTouchPosition];
      ........
       处理 按钮点击事件
    }
    

    相关文章

      网友评论

          本文标题:iOS:获取cell上的按钮点击所在的indexPath

          本文链接:https://www.haomeiwen.com/subject/jfnhoqtx.html