title: App crash when presenting UIAlertController
body: <p>My app's crashing when trying to present a <code>UIAlertController</code>.</p>
  
  <p>I have a <code>UIViewController</code> that gets presented modally, then on that presented view controller when a certain button is tapped I want to present a <code>actionSheet</code> alert.</p>
  
  <p>Somehow the app crashes when doing this and I cannot figure it out why.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
  alertController.addAction(UIAlertAction(title: "Image from Camera", style: .default, handler: { (_) in
      let cameraController = CameraController()
      self.present(cameraController, animated: true, completion: nil)
  }))
  alertController.addAction(UIAlertAction(title: "Image from Library", style: .default, handler: {(_) in
      let imagePickerController = UIImagePickerController()
      imagePickerController.delegate = self
      imagePickerController.allowsEditing = true
      self.present(imagePickerController, animated: true, completion: nil)
  }))
  alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
  alertController.view.tintColor = UIColor.rgb(red: 46, green: 94, blue: 120)
  self.present(alertController, animated: true, completion: nil)
  </code></pre>
  
  <p>The crash log: </p>
  
  <blockquote>
    <p>libc++abi.dylib: terminating with uncaught exception of type NSException</p>
  </blockquote>
  
  <p>When I <code>backtrace</code> the error it shows this:</p>
  
  <pre><code>    * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
      frame #0: 0x00000001101a7fce libsystem_kernel.dylib`__pthread_kill + 10
      frame #1: 0x00000001101e1150 libsystem_pthread.dylib`pthread_kill + 333
      frame #2: 0x000000010fe650e7 libsystem_c.dylib`abort + 127
      frame #3: 0x000000010fbf791f libc++abi.dylib`abort_message + 245
      frame #4: 0x000000010fbf7abb libc++abi.dylib`default_terminate_handler() + 265
      frame #5: 0x0000000109b341be libobjc.A.dylib`_objc_terminate() + 97
      frame #6: 0x000000010fc13159 libc++abi.dylib`std::__terminate(void (*)()) + 8
      frame #7: 0x000000010fc12e0a libc++abi.dylib`__cxa_rethrow + 99
      frame #8: 0x0000000109b340dc libobjc.A.dylib`objc_exception_rethrow + 40
      frame #9: 0x000000010a424a39 CoreFoundation`CFRunLoopRunSpecific + 537
      frame #10: 0x0000000112faf9c6 GraphicsServices`GSEventRunModal + 62
      frame #11: 0x000000010bd325e8 UIKit`UIApplicationMain + 159
      frame #13: 0x000000010fd92d81 libdyld.dylib`start + 1
      frame #14: 0x000000010fd92d81 libdyld.dylib`start + 1
  </code></pre>
  
  <p>I even tried to dispatch on main queue the presentation, but it still doesn't work.</p>
  
  <p>Any hint? </p>
  
  <p>Thank you.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>In order to filter some problems I've implemented a simple alert controller and it still crash using <code>.actionSheet</code> but not with <code>.alert</code></p>
  
  <pre><code>let alert = UIAlertController(title: "title", message: "message", preferredStyle: UIAlertControllerStyle.actionSheet)
  present(refreshAlert, animated: true, completion: nil)
  </code></pre>
  
  <p>Doing this it crashes, but if I use <code>.alert</code> it does not. </p>
  
  <p>Why is this happening</p>