You can create a popover presentation controller like this also and it may work
- (IBAction)showPopup:(UIButton *)sender {
ViewController *contentViewController = [[ViewController alloc] init];
contentViewController.preferredContentSize = CGSizeMake(200, 200);
contentViewController.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController *popoverpresentationController = contentViewController.popoverPresentationController;
popoverpresentationController.delegate = self;
popoverpresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp;
popoverpresentationController.sourceRect = sender.bounds;
popoverpresentationController.sourceView = sender;
[self presentViewController:contentViewController animated: YES completion: nil];
}