Search code examples
iosobjective-cipadpopover

xcode 7.3.1 my storyboard segues to popover are mis-aligned. Objective c


If I simply drag a popover segue from a button, the arrow aligns to the top left of the button, instead of the center.

Anyone have any ideas?


Solution

  • I solve this problems using PopoverController, use UIPopoverControllerDelegate

    myPopover = [[UIPopoverController alloc] initWithContentViewController:destinationViewController];
    myPopover.delegate = self;        
    [myPopover presentPopoverFromRect:((UIView *)sender).bounds inView:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];