You can get the center point of a cell within the coordinates of its superview or tableView using:
CGPoint center = cell.center;
If the tableview's superview is a UIView, how do you get the cell's center point within the coordinates of the superview of the tableview?
Edit:
The cell is in a tableView and the tableView is in self.view. I am mainly concerned about the y coordinate. I did a test to see what the values should be but am not getting the desired result from convertPointToView:
//debugger values appear below each line
CGRect viewRect = self.view.frame;
//(origin = (x = 0, y = 0), size = (width = 320, height = 568))
CGRect tableRect = self.tableView.frame;
//(origin = (x = 0, y = 108), size = (width = 320, height = 411))
CGPoint prelimcenter = cell.center;
CGPoint center = prelimcenter;
//(x = 160, y = 242)
prelimcenter = [cell convertPoint:prelimcenter toView:self.view];
// (x = 160, y = 526)
I would expect the difference in the Y coordinate to be about 108 which is the difference in the frames. However, the difference in the points using convertPoint is 284. What could be wrong with my syntax/code?