title: Deinit / Invalidate Timer
body: <p>I'm trying to deinit/invalidate <code>Timer</code> when user press back button but not when he push to next ViewController.</p>
  
  <pre><code>var timer = Timer()
                  timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(timePrinter), userInfo: nil, repeats: true)
                  timer.fire()
  
  override func viewWillDisappear(_ animated: Bool) {
      super.viewDidDisappear(animated)
      if self.isMovingFromParentViewController{
          timer.invalidate()
      }
  }
  </code></pre>
  
  <p>It is not working when user press back button.</p>