I have an application that is compatible with both iPhone and iPad layouts. For iPhone layout I have created Action Sheet and Pop over for iPad. The problem is pop over\'s arrow
For me worked using the sender and casting as UIView.
alertController.popoverPresentationController?.sourceView = sender as! UIView
alertController.popoverPresentationController?.sourceRect = sender.bounds
alertController.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.Up