title: Mac OS Xcode Swift Loading image from url into a ImageView in the Viewcontroller.swift file
body: <p>I am trying to load a image and post it an ImageView using Xcode on a Mac OS application. I like to use the viewcontroller file (not the appdelegate file). I appreciate it if you could help me with the typical commands to use. I looked at several internet postings but they resulted in warnings that the commands were not recognized. Likely I need to import a module. I appreciate your help. Thx.</p>
  
  <h1>I found the answer:</h1>
  
  <pre><code>let url = NSURL(string: “url”)
  var MyImage = NSImage(byReferencingURL: url!)
  MyImageView.image=MyImage
  </code></pre>