title: Presenting View Controller with Blur Effect
body: <p>I'm presenting a View Controller modally with a blur background effect. iOS 10/XCode 8 introduced a problem with my animation. This is the presentation code:</p>
  
  <pre><code>let modalVC = ModalViewController(nibName: "ModalViewController", bundle: nil)
  modalVC.modalTransitionStyle = .CrossDissolve
  modalVC.modalPresentationStyle = .OverFullScreen
  presentViewController(modalVC, animated: true, completion: nil)
  </code></pre>
  
  <p>Adding the blur on <code>viewDidLoad()</code> function in the ModalViewController:</p>
  
  <pre><code>let blurEffect = UIBlurEffect(style: .Light)
  let blurEffectView = UIVisualEffectView(effect: blurEffect)
  blurEffectView.frame = view.bounds
  blurEffectView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
  
  view.addSubview(blurEffectView)
  view.sendSubviewToBack(blurEffectView)
  </code></pre>
  
  <p>The <code>ModalViewController</code> has a clear background and I added a <code>BlurEffectView</code> with a Dark Blur Effect. Tried both programmatically with the previous snippet and in Interface Builder.</p>
  
  <p>On iOS 8 &amp; 9 the <code>.CrossDissolve</code> transition took care of the "fade", but after testing on iOS 10 (both the device and simulator) the view appears with a dark semi-transparent background color instead of the blur. </p>
  
  <p>After the <code>.CrossDissolve</code> animation finishes, the background color changes to the actual blur effect background. Any ideas why this is happening?</p>
  
  <p>Also tried adding <code>layoutIfNeeded()</code> at the beginning and end of <code>viewDidLoad()</code> for the modal view controller without any luck. I'm using swift 2.3</p>