indexpath获取cell

2017-04-07  本文已影响791人  楠Y

UITableViewCell *cell = (UITableViewCell *)[btn superview];

NSIndexPath *indexPath = [_myTableView indexPathForCell:cell];

NSLog(@"indexPath is = %i",indexPath.row);

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

MyCustomCell *cell = (MyCustomCell *)[tableView cellForRowAtIndexPath:indexPath];

上一篇 下一篇

猜你喜欢

热点阅读