title: CAEmitterLayer particles not visible when UIViewController is presented modally
body: <p>I have a particle system created with a <code>CAEmitterLayer</code>. The particle effect creates a confetti effect where confetti drops down from the top of the view. The <code>CAEmitterLayer</code> is added as a sublayer to an <code>UIView</code> (specifically created for that purpose in a storyboard, the <code>confettiView</code>) in <code>viewDidLoad()</code> for the view controller:</p>
  
  <pre><code>override func viewDidLoad() {
          ...
          createParticles(for: confettiView)
          ...
  }
  
  func createParticles(for view: UIView) {
          let particleEmitter = CAEmitterLayer()
          particleEmitter.emitterPosition = CGPoint(x: view.center.x, y: -96)
          particleEmitter.emitterShape = kCAEmitterLayerLine
          particleEmitter.emitterSize = CGSize(width: view.frame.size.width, height: 1)
          ...
          (adding the emitter cells here)
          ...
          view.layer.addSublayer(particleEmitter)
  }
  </code></pre>
  
  <p>When the <code>UIViewController</code> including the <code>UIView</code> is displayed with the following custom code (by adding it to another <code>UIViewController</code>) the effect is displayed correctly.</p>
  
  <pre><code>parentViewController.addChildViewController(childViewController)
  childViewController.frame = parentViewController.view.frame
  parentViewController.view.addSubview(childViewController.view)
  childViewController.didMove(toParentViewController: parentViewController)
  </code></pre>
  
  <p>But when I change the view to be presented modally (with <code>UIViewController.present</code>), the effect is not visible:</p>
  
  <pre><code>parentViewController.present(childViewController, animated: true)
  </code></pre>
  
  <p>Any insights on how to make the particle effect visible when the view controller is presented modally? </p>