title: How can I show the tab bar controller when I unwind from a view controller to another view controller that's a child of the tab bar controller?
body: <p>I have a tab bar controller and 3 childs of it, also I have another view which I made a custom segue from the childs to the view controller, and also a custom unwind segue from the view controller to the child. The problem is that while the unwind is happening, the tab bar is hidden and it shows when the unwind is finished.</p>
  
  <p>Here´s a GIF example:</p>
  
  <p><a href="https://i.stack.imgur.com/SlPgd.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SlPgd.gif" alt="enter image description here"></a></p>
  
  <p>Here's my code of the custom segue unwind:</p>
  
  <pre><code>import UIKit
  
  class AddMeCustomSegueUnwind: UIStoryboardSegue {
  override func perform() {
      // Assign the source and destination views to local variables.
      let secondVCView = self.sourceViewController.view as UIView!
      let firstVCView = self.destinationViewController.view as UIView!
  
      let screenHeight = UIScreen.mainScreen().bounds.size.height
  
      let window = UIApplication.sharedApplication().keyWindow
      //window?.insertSubview(firstVCView, aboveSubview: secondVCView)
      //window?.insertSubview(firstVCView, belowSubview: secondVCView)
      window?.insertSubview(firstVCView, atIndex: 0)
  
      // Animate the transition.
      UIView.animateWithDuration(0.4, animations: { () -&gt; Void in
          secondVCView.frame = CGRectOffset(secondVCView.frame, 0.0, -screenHeight + 64)
          }) { (Finished) -&gt; Void in
              self.sourceViewController.dismissViewControllerAnimated(false, completion: nil)
      }
  }
  }
  </code></pre>