获取当前cell在屏幕中的位置

CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
CGRect rect = [tableView convertRect:rectInTableView toView:[tableView superview]]; 

如果是在Cell.m文件中想获取

CGRect rectInTableView = [(UITableView *)self.superview rectForRowAtIndexPath:self.indexPath];
CGRect rect = [[(UITableView *)self.superview convertRect:rectInTableView toView:[[(UITableView *)self.superview superview]]; 

你可能感兴趣的:(获取当前cell在屏幕中的位置)