title: Swift 2.0 UIImagePickerController dismissing parent view on close
body: <p>Started developing an app in Xcode 6.* using a pre-2.0 version of swift. Since updating to Xcode 7.0 ans swift 2.0, my application isn't behaving as expected. </p>
  
  <p>In my application I have a typical user settings view that get's pushed onto my NavigationController like:</p>
  
  <pre><code>let storyBoard = UIStoryboard(name: "Main", bundle: nil)
  let view = storyBoard.instantiateViewControllerWithIdentifier("settingsView")
  controller.navigationController?.setViewControllers([view], animated: false)
  </code></pre>
  
  <p>When the user then taps on their profile image, the <code>UIImagePickerController</code> is presented. Now however, if the user taps on cancel or selects an image, the image controller is dismissed, but so is the user settings controller too. Why exactly is this happening all of a sudden (it was working as expected before the Xcode update).</p>
  
  <p>The code handling the picture selection looks like:</p>
  
  <pre><code>func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
      if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
          self.imageUrl = info[UIImagePickerControllerReferenceURL] as! NSURL
          self.Picture.contentMode = .ScaleAspectFill
          self.Picture.image = pickedImage
          self.PictureChosen = true
      }
  
      dismissViewControllerAnimated(true, completion: nil)
  }
  </code></pre>