title: Why initializing a UIImageView object with image returns nil?
body: <pre><code>@IBOutlet weak var checkMark: UIImageView!
  override func viewDidLoad() {
      checkMark = UIImageView(image: UIImage?)
  }
  </code></pre>
  
  <p>I have initialize a object and set it with a UIImage. What I think is that this initialize a object with a picture in there, so it should show on screen, but it returns nil when <code>checkMark.isHidden = true</code>.</p>
  
  <p>So, I use this method, just set an image in the assets to <code>checkMark.image</code>. It works, but I do not know what the difference is between these two.</p>
  
  <pre><code>checkMark.image = #imageLiteral(resourceName: "answerCheckMark.png")
  </code></pre>