I have a tableView with custom cells. One of the objects in the cell is a textField. The tableViewController is the textFieldDelegate. The datasource for the table is an arr
-[UIView center] returns the center of the view's frame, which is in the view's superview's coordinate system. But -[UIView convertPoint:fromView:] expects to be given a point in the "from" view's coordinate system.
Either give it the same point, and tell it to convert from the correct view:
CGPoint point = [textField center];
point = [self.tableView convertPoint:point fromView:textField.superview];
Or give it a point in the view's coordinate system, and tell it to convert from the view:
CGRect textFieldBounds = textField.bounds;
CGPoint point = CGPointMake(CGRectGetMidX(textFieldBounds), CGRectGetMidY(textFieldBounds));
point = [self.tableView convertPoint:point fromView:textField];