title: NSImageView ClipsToBounds
body: <p>I have an iOS app that uses the code below. I am now creating the app for Mac OS X and would like the same effect however I do not seem to be able to use <code>clipsToBounds</code>. What should I be using?
  I have the rest of the code working on the Mac, just not that part.
  Thanks</p>
  
  <pre><code>var myImage = UIImage()                   
  let view = UIImageView(frame: CGRectMake(0, 0, 100, 100))               
  view.contentMode = UIViewContentMode.ScaleAspectFill
  view.layer.opacity = opacity
  view.layer.cornerRadius = cornerRadius
  view.clipsToBounds = true
  view.image = self.myImage
  self.mainView.addSubview(view)
  </code></pre>