Given a UITableView
, how can I find the location of a specific UITableViewCell
? In other words, I want to get its frame relative to my iPhone screen, n
Try the following(sending nil as a toView parameter means you want to convert you rect to window coordinates):
CGRect r = [cell convertRect:cell.frame toView:nil];
And remember that if particular row is not currently visible then there may not be UITableViewCell for it - so before using that code you may need to check if cell is valid (not nil for example)