通过event 找到tableview 上的某一个cell

- (void)didclickBtn_edit:(UIButton *)sender event:(UIEvent *)event

{

    UITouch *touch = [[event allTouches] anyObject];

    CGPoint currentTouchPosition = [touch locationInView:self.tableview_showdata];

    NSIndexPath *indexPath = [self.tableview_showdata indexPathForRowAtPoint: currentTouchPosition];

    if (indexPath != nil)

    {

        NSLog(@"%ld,%ld",indexPath.row,indexPath.section);

    }

}

posted @ 2015-03-04 19:00  lanacon  Views(110)  Comments(0Edit  收藏  举报