1

I have a question regarding how to do a popover in iOS9. I have been working on trying to get a popover to display over a MapView using this question and answer by Rob. However, using a UIPopoverController was depreciated and now xCode is telling me...

Popovers are now implemented using UIViewController presentations. Use modal presentation style UIModalPresentationPopover and UIPopoverPresentationController

However, I have not been able to figure out how to exactly do that and I would hope that someone else knows how to implement a popover using iOS9.

Here is my code so far.

func mapView(mapView: MKMapView, didSelectAnnotationView view: MKAnnotationView) {
    let annoation = view.annotation!
    mapView.deselectAnnotation(annoation, animated: false)
    let popupController  = storyboard?.instantiateViewControllerWithIdentifier("mapPopupViewController") as! PopupAnnotationViewController
    popupController.annotation = annoation

    //WHAT TO DO NOW?

}
Community
  • 1
  • 1
Anthony Dito
  • 3,610
  • 3
  • 29
  • 56

0 Answers0