2

How can I get exact y position of cell, when user tapped accessory button in table view? I mean not index position in table, but y coordinate of this row. Thank you.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
famer
  • 469
  • 1
  • 5
  • 14

1 Answers1

2
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];

Will give you the coordinates within the tableView's content. If you want to convert to the parent view's coordinates, use

 CGRect rect = [tableView convertRect:rectInTableView toView:[tableView superview]];

In addition to the previous line.

Jpoliachik
  • 2,558
  • 2
  • 24
  • 23