Search code examples
iphoneipaduitouch

UITouch for UItableview?


I want to calculate touch location of tableview evenif we scroll it as we do in normal UIView?


Solution

  • You can calculate touch on selected cell and convert it to table view coordinates. X coordinate will the same as cell, but Y = Y+indexPath.row*cell.height.

    See also UIView convertPoint method.