I am trying to make a popover look like one in a 2014 WWDC session 214.
So, I started building my application using IB, which has two views related to the “Presence as Popover” segue, as such:
The popover view contains a text view that fills its supervisor with the following restrictions: 
To support modal popover the following code:
func adaptivePresentationStyleForPresentationController(controller: UIPresentationController) -> UIModalPresentationStyle { return .OverFullScreen } func presentationController(controller: UIPresentationController, viewControllerForAdaptivePresentationStyle style: UIModalPresentationStyle) -> UIViewController? { let navigationController = UINavigationController(rootViewController: controller.presentedViewController) controller.presentedViewController.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Done, target: self, action: "done"), animated: true) return navigationController }
This gave me the following result: 
Then I tried to add a UIVisualEffectView with a blur effect. At first, I simply added a subview to the controller view, and after checking the View Hierarchy, I realized that my effect view was actually on top of my text view, but my text view was placed correctly. So I tried the insertSubview: atIndex: method, like:
func presentationController(controller: UIPresentationController, viewControllerForAdaptivePresentationStyle style: UIModalPresentationStyle) -> UIViewController? { let effectView = UIVisualEffectView(effect: UIBlurEffect(style: .Light)) as UIVisualEffectView effectView.setTranslatesAutoresizingMaskIntoConstraints(false) controller.presentedViewController.view.insertSubview(effectView, atIndex: 0) let viewList : [String : UIView] = ["effectView" : effectView] let navigationController = UINavigationController(rootViewController: controller.presentedViewController) controller.presentedViewController.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Done, target: self, action: "done"), animated: true) controller.presentedViewController.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[effectView]|", options: nil, metrics: nil, views: viewList)) controller.presentedViewController.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-[effectView]|", options: nil, metrics: nil, views: viewList)) return navigationController }
But I still can not imagine the text representation defined in IB: 
Through the view hierarchy, I see that my text view is somehow moving under the navigation bar when I insert a UIVisualEffectView at index 0.
Any thoughts on how I can programmatically set the blur effect below my text without causing it to fade / move under the navigation bar?
Greetings