The location however is the cells location in the tableview, not the location in the visible region. Is there anyway I can map this back to the visible region?
UITableView has a method 'indexPathsForVisibleRows' that returns an array of index paths of visible rows, or 'visibleCells' that returns array of visible table cells. Visit UITableView class reference at apple website. UITableView Class Reference
UITableView has a method 'indexPathsForVisibleRows' that returns an array of index paths of visible rows, or 'visibleCells' that returns array of visible table cells. Visit UITableView class reference at apple website. UITableView Class Reference
Thanks but I think you may have misunderstood. Rather than looking for the visible cells, im looking for the onscreen position of a cell.
The location however is the cells location in the tableview, not the location in the visible region. Is there anyway I can map this back to the visible region?
I don't think there is a quick way to do it. You will have to access the parent views and calculate your own offset I think.
Thanks but I think you may have misunderstood. Rather than looking for the visible cells, im looking for the onscreen position of a cell.
The zeroth cell in the array returned by visibleCells will be at the first position on the screen. Is this something u r referring as 'onscreen' position?
The zeroth cell in the array returned by visibleCells will be at the first position on the screen. Is this something u r referring as 'onscreen' position?
I think it is more a question of getting the absolute location of an object versus the relative location.
The zeroth cell in the array returned by visibleCells will be at the first position on the screen. Is this something u r referring as 'onscreen' position?
Thats a good point. I was thinking there may of been a built in way of calculating it, but based off the zeroth visible cell should work perfect. Thanks!