title: Constrain/center CAEmitterLayer even after device rotation
body: <p>In Swift Playgrounds for iPad, I am having difficulty constraining CAEmitterLayer instance to the center permanently. For example, it stays centered until the device is rotated, so I need to find some way to constrain it to the center for all device orientations.</p>
  
  <p>Here is what I have so far, keep in mind I’ve tried adding observers to device orientation with no avail. But this could just be an error on my part. Thanks!</p>
  
  <pre><code>emitterLayer.emitterPosition = CGPoint(x: view.center.x, y: view.center.y)
  
  let cell = CAEmitterCell()
  cell.birthRate = 25
  cell.lifetime = 30
  cell.velocity = 250
  cell.velocityRange = 250
  cell.spinRange = 5
  cell.scale = 0.04
  cell.scaleRange = 0.03
  cell.alphaSpeed = -0.15
  cell.emissionRange = CGFloat.pi * 2
  cell.contents = UIImage(named: "RainbowApple")?.cgImage
  
  emitterLayer.emitterCells = [cell]
  emitterLayer.beginTime = CACurrentMediaTime()
  emitterLayer.zPosition = -1
  view.layer.addSublayer(emitterLayer)
  
  emitterLayer.emitterSize = CGSize(width: 320, height: 1)
  emitterLayer.renderMode = CAEmitterLayerRenderMode.oldestLast
  </code></pre>