title: How to set an image in imageview swift 3?
body: <p>So I have an image view titled cashOrCredit and have am trying to set it's image programatically but somehow not able to.</p>
  <p>First I set the image like this</p>
  <pre><code>cell.cashOrCredit.image = UIImage(named: &quot;cash1.png&quot;)
  </code></pre>
  <p>and I get an error saying a separator of &quot;,&quot; is needed.</p>
  <p>Then I tried it this way</p>
  <pre><code>var cashImage: UIImage?
  cashImage = &quot;cash1.png&quot;
  cell.cashOrCredit.image = cashImage
  </code></pre>
  <p>But I get a THREAD 1 EXC BAD INSTRUCTION error.
  I can't seem to understand what is going wrong ?</p>
  <p>Here is the error</p>
  <p><img src="https://i.stack.imgur.com/L8OFG.png" alt="1" /></p>