title: MPMediaPickerController closes after startup (Swift)
body: <p>When I click on the cell to open the MPMediaPickerController it opens when it starts up.</p>
  
  <p><a href="https://media.giphy.com/media/g4XjruCchwlHvODSBb/giphy.gif" rel="nofollow noreferrer"><img src="https://media.giphy.com/media/g4XjruCchwlHvODSBb/giphy.gif" alt="gif"></a></p>
  
  <pre><code>class MediaViewController: UITableViewController, MPMediaPickerControllerDelegate
  
  override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      if indexPath.section == 2 {
          if indexPath.row == 0 {
             let mediaPicker = MPMediaPickerController(mediaTypes: MPMediaType.anyAudio)
             mediaPicker.delegate = self
             mediaPicker.prompt = "Select song"
             mediaPicker.allowsPickingMultipleItems = false
             self.present(mediaPicker, animated: true, completion: nil)
          }
      }
  }
  
  func mediaPicker(_ mediaPicker: MPMediaPickerController, didPickMediaItems  mediaItemCollection:MPMediaItemCollection) -&gt; Void {
  }
  
  func mediaPickerDidCancel(_ mediaPicker: MPMediaPickerController) {
      dismiss(animated: true, completion: nil)
      print("MPMediaPickerController - Cancel")
  }
  </code></pre>