title: How to change picture orientation in Xcode swift
body: <p>I get a picture from the photo library and call it image using this code:</p>
  
  <pre><code>@IBAction func importImage(_ sender: AnyObject) {
      let image = UIImagePickerController()
      image.delegate = self
      image.sourceType = UIImagePickerControllerSourceType.photoLibrary
      image.allowsEditing = false
      self.present(image, animated: true) { }
  }
  </code></pre>
  
  <p>and this code:</p>
  
  <pre><code>func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
      if let image = info[UIImagePickerControllerOriginalImage] as? UIImage {
          myImageView.image = image
          dismiss(animated: true, completion: nil)
          SubmitBtnOutlet.isHidden = false;
          Gurpcontroller.person = "yours";
          Gurpcontroller.collecterthing = "Coin";
          PictureViewController.imageuniversal = myImageView
      } else {
          //Error message
      }
  }
  </code></pre>
  
  <p>I want to see if image is landscape or portrait. Then, if it is landscape I want to change it to portrait.</p>