Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had the same kind of problem, here's the workaround i used :</p> <ul> <li>in my UITableViewCell, i added Actions (IBActions as i generate my cells from a NIB) for cell's specific buttons.</li> <li>i then defined a CellActionDelegate protocol that mimics my actions selectors, to which i had my button (sender) and my cell (self)</li> <li>then the detailViewController of my splitViewController implements this protocol, converting from the cell's to its coordinates...</li> </ul> <p>here a example of code</p> <p>In MyCustomTableViewCell.m :</p> <pre><code> -(IBAction)displaySomeCellRelativePopover:(id)sender{ //passes the actions to its delegate UIButton *button = (UIButton *)sender; [cellActionDelegate displaySomeCellRelativePopoverWithInformation:self.info fromButton:button fromCell:self]; } </code></pre> <p>and the, in MyDetailViewController.m :</p> <pre><code>-(void)displaySomeCellRelativePopoverWithInformation:(MyCellInformationClass *)info fromButton:(UIButton *)button fromCell:(UIView *)cell{ UIPopoverController * popoverController = nil; //create your own UIPopoverController the way you want //Convert your button/view frame CGRect buttonFrameInDetailView = [self.view convertRect:button.frame fromView:cell]; //present the popoverController [popoverController presentPopoverFromRect:buttonFrameInDetailView inView:self.view permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];] //release objects created... } </code></pre> <p>PS : Of course, the 'action' doesn't have to be a IBAction, and the frame from where the popover originates doesn't have to be a UIButton - a single UIView would be good :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload