views:

276

answers:

1

I show a popover whenever a cell in my tableview is touched, with the arrow pointing to the cell, and always pointing left or right, not up or down.

The table view is set as the popover's passthroughView, so that the user can select a different cell while the popover is still open, resulting in a new popover for the selected cell.

However, this means that the user can also scroll the table while the popover is open. When this happens, how can I make the popover's arrow continue to point at the selected cell?

Unfortunately, UITableView is, not is contained in, a UIScrollView, so I can't simply present the popover in the tableview's coordinate system. Also, table cells do not seem to have a defined frame to present the popover from. I don't see any way in the API to move the popover's arrow manually.

Any ideas? Thanks.

+1  A: 

It turns out, you can use presentPopoverFromRect:InView: even when the popover has already been presented; this will cause the popover controller to recompute its arrow position.

David M.