通过控件获取cell

#pragma mark - 通过控件获取cell

-(UITableViewCell*)GetCellFromTableView:(UITableView*)tableView Sender:(id)sender {

    CGPoint pos = [sender convertPoint:CGPointZero toView:tableView];

    NSIndexPath *indexPath = [tableView indexPathForRowAtPoint:pos];

    return [tableView cellForRowAtIndexPath:indexPath];

}

posted on 2014-10-09 19:10  jack_yan  阅读(214)  评论(0编辑  收藏  举报