title: Moving to root view controller without showing child views
body: <p>I want to dismiss all child views and finally move to root view controller. I used the following code</p>
  
  <pre><code>DispatchQueue.main.async {
          appDelegate.window?.rootViewController?.dismiss(animated: false, completion:nil)
  }
  </code></pre>
  
  <p>But issue is that while moving to root view , it showing child view first  then root view . </p>
  
  <p>How can i solve the issue? any idea?</p>