title: Calling layer.setNeedsDisplay() shows a black background
body: <p>When I call <code>setNeedsDisplay()</code> on my UIView's CALayer (either directly, or via <code>needsDisplayOnBoundsChange</code>), it draws the background as black. </p>
  
  <pre><code>myView.layer.setNeedsDisplay()
  </code></pre>
  
  <p>When I call 'setNeedsDisplay()' on the UIView directly, it doesn't show up as black:</p>
  
  <pre><code>myView.setNeedsDisplay()
  </code></pre>
  
  <p>Why does this happen, and how can I fix it?</p>
  
  <p><a href="https://i.stack.imgur.com/OJXwXm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OJXwXm.png" alt="enter image description here"></a></p>