以下步骤写在 cell上button的点击事件中
UITableViewCell*cell=(UITableViewCell*)btn.superview.superview;
NSIndexPath *indexPath = [yourTab indexPathForCell:cell];
CGRect rectInTableView = [yourTab rectForRowAtIndexPath:indexPath];
CGRect rect = [yourTab convertRect:rectInTableView toView:[yourTab superview]];
网友评论