title: How to set NSView Instance Properties
body: <p>In the <a href="https://developer.apple.com/reference/appkit/nsview" rel="nofollow noreferrer">NSView class documentation</a>, there is a symbol <a href="https://developer.apple.com/reference/appkit/nsview/1483277-candraw" rel="nofollow noreferrer"><code>canDraw</code></a> that indicates whether drawing commands will produce any results.</p>
  
  <p>The declaration is <code>var canDraw: Bool { get }</code> - so anytime you try something such as </p>
  
  <pre><code>@IBOutlet weak var myView: NSView!
  </code></pre>
  
  <p>then <code>myView.canDraw = true</code>, you get a build-time error stating "<code>Cannot assign to property: 'canDraw' is a get-only property</code>". However, if I want to draw NSRect onto my view, how can I change this property?</p>