Here’s something that helped me when I was working with WEPopover to implement a popover in my iPhone app a la the iPad.
If your popover is being instantiated from a
UIViewController with a
UITableView in it that does not fill up the whole window, then you may have some issues getting the popover to align properly.
To get the alignment to work, you need to get the
UITableViewCell‘s absolute position on screen.
You can achieve that through the following code:
CGRect rectInTableView = [tableView rectForRowAtIndexPath:indexPath];
CGRect rectInSuperview = [tableView convertRect:rectInTableView toView:[tableView superview]];
Thanks to Nick Weaver at this StackOverflow question for explaining this. Took some finding.