I have an UIPopoverController
that presents an UIViewController
using this method:
[self.popover presentPopoverFromBarButtonItem:self.infoBarButtonItem
permittedArrowDirections:UIPopoverArrowDirectionUp
animated:YES];
self.popover
is my UIPopoverController
.
The code works well, but the Popover arrow is in the middle of the BarButtonItem
how do I display the Popover with its arrow "under" the button?
This is what it currently looks like:
In iOS 9 you can try this code:
let alert = UIAlertController(title: "title", message: "message", preferredStyle: UIAlertControllerStyle.ActionSheet)
alert.modalPresentationStyle = UIModalPresentationStyle.Popover
alert.popoverPresentationController?.barButtonItem = sender
presentViewController(alert, animated: true, completion: nil)