allowedArrowDirections =.Down, . Swift:
if let popoverPresentationController = shareViewController.popoverPresentationController {
popoverPresentationController.permittedArrowDirections = .Down
popoverPresentationController.delegate = self
popoverPresentationController.sourceView = sender as! UIButton
popoverPresentationController.sourceRect = CGRectMake(0, 0, sender.frame.size.width, sender.frame.size.height)
}