title: how to stop a dispatchQueue in swift
body: <p>I have a DispatchQueue for a introViewController that shows a gif for 11 seconds and then display my login page... But also have a button that skip the intro and display the login. When I click it the time still running and when I am navigating in the app goes back to the login when the time ends.</p>
  
  <p>this is my class </p>
  
  <pre><code>class GifClass: UIViewController {
  
  @IBOutlet weak var gifImage: UIImageView!
  @IBOutlet weak var skipButton: UIButton!
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      gifImage.loadGif(name: "promed")
  
      DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(11)) {
  
          self.performSegue(withIdentifier: "introLogin", sender: self)
      }
  
  }
  
  
  @IBAction func skip(_ sender: Any) {
  
  
      performSegue(withIdentifier: "introLogin", sender: self)
  
  }
  
  }
  </code></pre>
  
  <p>how do I do to stop the time when I click the button?</p>