title: How do you create a UIImage View Programmatically - Swift
body: <p>I'm trying to create a UIImage View programmatically, I have a new view and I tried doing this</p>
  
  <pre><code>let imageName = "yourImage.png"
  yourview.backgroundColor = UIColor.colorWithPatternImage(UIImage(named:imageName))
  </code></pre>
  
  <p>this did not work because I don't know what this should be <strong>yourview</strong> in the second line.</p>
  
  <p><strong>Question:</strong>
  How do I make a UIImageView appear on the screen by coding it instead of doing it in the storyboard</p>