ShinobiGrid: retrieve window coordinate


#1

Hi, is there a way to retrieve the window coordinates inside didTapCellAtCoordinate method? I tried to add a tap gesture but it is called after didTapCellAtCoordinate, so i cannot get the coordinates with [tap locationInView:self.view]. Any help? Cesare


#2

Hi isis,

By “window coordinates” do you mean the frame of the tapped cell? If so, you should be able to use the coordinate paramter passed into the didTapCellAtCoordinate delegate method to retrieve this cell from the grid.

Something like SDataGridCell *tappedCell = [grid visibleCellAtCoordinate:coordinate] should work. You should then be able to retreive the cell’s frame from tappedCell.

Let me know how you get on with this. :slight_smile: