title: Why is my keyboard being loaded whenever I load my UIImagePickerController view?
body: <p>I have a <code>UIActionSheet</code> for selecting between the camera or the photo library to embed an image into a <code>UITextView</code> but for whatever reason it's loading the keyboard. I force close the keyboard on press of the left button of the bar surrounding the <code>UITextView</code> but when I press photo library I opens and closes the keyboard before pushing to the image picker VC.</p>
  
  <pre><code>override func didPressLeftButton(sender: AnyObject?) {
      let cameraMenu = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet)
  
      let photoLibrary = UIAlertAction(title: "Photo Library", style: .Default, handler: { (UIAlertAction) in
          self.openPhotoLibrary()
      })
  
      let takePhoto = UIAlertAction(title: "Open Camera", style: .Default, handler: { (UIAlertAction) in
          self.textView.endEditing(true)
          self.openCamera()
      })
  
      let cancel = UIAlertAction(title: "Cancel", style: .Cancel, handler: nil)
  
      cameraMenu.addAction(photoLibrary)
      cameraMenu.addAction(takePhoto)
      cameraMenu.addAction(cancel)
  
      self.presentViewController(cameraMenu, animated: true, completion: nil)
  }
  
  func openPhotoLibrary() {
      imagePicker.sourceType = .PhotoLibrary
      imagePicker.allowsEditing = false
      presentViewController(imagePicker, animated: true, completion: nil)
  }
  
  func openCamera(){
      imagePicker.sourceType = .Camera
      imagePicker.showsCameraControls = true
      presentViewController(imagePicker, animated: true, completion: nil)
  }
  
  func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
      if let pickedImage = info[UIImagePickerControllerOriginalImage] as? UIImage {
          // Image resizing
          let textViewWidth: CGFloat = self.textView.frame.size.width - 20
          let percentResize = textViewWidth / pickedImage.size.width
          let toBeExportedHeight = pickedImage.size.height * percentResize
          let resizedImage = ImageManipulationManager.sharedInstance.resizeImage(exportedWidth: Int(textViewWidth),exportedHeight: Int(toBeExportedHeight), originalImage: pickedImage)
  
          // Storage into TextView
          let attachment = NSTextAttachment()
          attachment.image = resizedImage
          let attString = NSAttributedString(attachment: attachment)
          textView.textStorage.insertAttributedString(attString, atIndex: textView.selectedRange.location)
          pastedImageLocations.append(textView.selectedRange.location)
          textView.selectedRange.location = textView.selectedRange.location + 1
          textView.textStorage.insertAttributedString(NSAttributedString(string: "\n"), atIndex: textView.selectedRange.location)
          textView.selectedRange.location = textView.selectedRange.location + 1
          textView.font = UIFont.systemFontOfSize(16.0)
  
          // Image Caching
          if let data = UIImageJPEGRepresentation(pickedImage, 0.50) {
              socketMessages.append(["data": data])
              haneke.set(value: data, key: String(unsafeAddressOf(attachment.image!)))
              print("Image cached as \"\(String(unsafeAddressOf(attachment.image!)))\"")
          }
      }
      dismissViewControllerAnimated(true, completion: nil)
      self.textView.becomeFirstResponder()
  }
  </code></pre>