Poppors are now pretty thin. First, you will want to configure the popoverPresentationController before you submit it.
Second, make sure that the direction of the arrow indicates how the arrow points, and not where the content corresponds to UIBarButtonItem. So, if it's inside the UIToolbar (and is near the bottom of the screen), you will want .Down otherwise, if its navigation bar (at the top) you want to use .Up .
@IBAction func distancePopOver( sender : UIBarButtonItem){
Now, if you have gone this far and still not working, this is because the default behavior in the compact class is to fill the screen. Since you already set your view manager as a popover delegate, you just need to implement this delegate function: adaptivePresentationStyleForPresentationController(_:traitCollection:) and return .None for the presentation style. This will even allow you to show a real look on the iPhone. See My Blog Post: iPhone Popover for a full example of this.
Korey hinton
source share