title: Camera & Photo Library Permission - Handle when a user does not accept to allow iOS 10
body: <p>I am requesting users to accept access to both photo library and camera use.  I would like to be able to handle the case for when a user does not accept, but I am having issues doing so.  Here is the code for when I check user permission:</p>
  
  <pre><code>AVCaptureDevice.requestAccess(forMediaType: AVMediaTypeVideo) { granted in
          if granted {
              if(!self.captureSession.isRunning){
                  self.setupCustomCamera()
              }
          } else {
              self.takePhotoButton.alpha = 0.5
              self.takePhotoButton.isEnabled = false
              self.showNeedAccessMessage()
          }
  }
  </code></pre>
  
  <p>And my <code>showNeedAccessMessage()</code> as follows:</p>
  
  <pre><code>func showNeedAccessMessage() {
          let alert = UIAlertController(title: "Camera Settings", message: "Please adjust your device settings to grant access to camera use.", preferredStyle: .alert)
  
          alert.addAction(UIAlertAction(title: "OK", style: .cancel, handler: { (action: UIAlertAction) -&gt; Void in
              self.dismiss(animated: true, completion: nil)
          }))
  
          show(alert, sender: nil)
  }
  </code></pre>
  
  <p>The issue here is that when the <code>granted</code> case is not met, I would like to show an alert.  Instead of my alert showing, my application attempts to open the 'Image Settings' page, which shows up as follows:
  <a href="https://i.stack.imgur.com/BtD1G.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BtD1G.jpg" alt="enter image description here"></a></p>
  
  <p>Is there a default handling for this case?  If so, any ideas how I would go about fixing the black 'Image Settings' screen?</p>
  
  <p>Thank you in advance!</p>