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];