I have a function I’d previously written to present a popover from a bar button item, now I’m trying to reuse it to show the popover from a cell accessory when the table is in edit mode.
I’ve tried
[self showPopover:[[theTableView cellForRowAtIndexPath:indexPath] editingAccessoryView]]
but this is NULL.
Originally it’s set with [cell setEditingAccessoryType: UITableViewCellAccessoryDetailDisclosureButton]; if that makes any difference.
And the popover function is
-(void) showPopover:(id)sender {
...
[self.popOver presentPopoverFromBarButtonItem:sender
permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
Any ideas please.
How about trying to display with:
Just pass it your cell.accessoryView.frame as the “rect” argument.