在tableview上有这个方法
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
CGRect rectInSuperview = [tableView convertRect:rectInTableView toView:[tableView superview]];
在collectionView
//获取父类view
UIView *v = [aBtn superview];
//获取cell
THYCProductListCell *cell = (THYCProductListCell *)[vsuperview];
//获取cell在当前collection的位置
CGRect cellInCollection = [_collectionViewconvertRect:cell.frametoView:_collectionView];
//获取cell在当前屏幕的位置
CGRect cellInSuperview = [_collectionViewconvertRect:cellInCollection toView:self.view];