title: Keep CABasicAnimation running while moving to another screen
body: <p>Here I am, stuck with what sounds like a basic issue...</p>
  <p>I made a simple app that runs a CABasicAnimation: if I shut the app and reopen, the animation is still on going (which is perfect), BUT if I change screen in the same app and then come back, the animation has stopped (which is bad).</p>
  <p>Any tip ti help me fixing the issue and keep the animation running while the user is on another screen from the same app ?</p>
  <pre><code>    override func viewDidLoad() {
      super.viewDidLoad()
      swipeVC()
      myCircle()
  }
  
      // Animated circle
  func myCircle() {
      
      // Center the shape
      let center = view.center
      
      // Create back shape
      let backlayer = CAShapeLayer()
      let circulationPath = UIBezierPath(arcCenter: center, radius: 100, startAngle: -CGFloat.pi / 2, endAngle: 2 * CGFloat.pi, clockwise: true)
      
      // Designing the animated circle
      backlayer.path = circulationPath.cgPath
      backlayer.fillColor = UIColor.clear.cgColor
      backlayer.strokeColor = UIColor.red.cgColor
      backlayer.lineWidth = 5
      view.layer.addSublayer(backlayer)
      
      // Designing the animated circle
      shapeLayer.path = circulationPath.cgPath
      shapeLayer.fillColor = UIColor.clear.cgColor
      shapeLayer.strokeColor = UIColor.green.cgColor
      shapeLayer.lineWidth = 10
      shapeLayer.strokeEnd = 0
      shapeLayer.lineCap = .round
      
      // Add gesture recgnition to activate the circle animation
      view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(handleTap)))
      
      // Adding the circle to the main view
      view.layer.addSublayer(shapeLayer)
      
  }
  </code></pre>