     { (done) in
       if done {
         self.swipeBackCancelled = false
+        self.tabBarVisible = false
+        self.manualTransition = false
       }
     }
   }
   
   func showTabBar() {
     self.tabBarBottom.constant = CGFloat(self.bottomPosition)
-    UIView.animateWithDuration(self.animationDuration) {
+    
+    UIView.animateWithDuration(self.animationDuration, animations: { 
       self.view.layoutIfNeeded()
+      }) { (done) in
+        if done {
+          if !self.manualTransition {
+            self.tabBarVisible = true
+          }
+        }
     }
   }
   

    
    if var hasSwipeBack = self.destinationVC as? SwipeBackPositionProtocol {
      hasSwipeBack.positionClosure = { position in
        self.calculateTabBarPosition(position)
      }
    }
    

  weak var destinationVC: UIViewController?
  var previousVC: UIViewController?
  var tabBarVisible = true
  var manualTransition = false
  let animationDuration = 0.3 //duration of show/hide tab bar animation
  let bottomPosition = 0 //bottom tab bar position, 0 - means it will stick to bottom
  @IBOutlet weak var container: UIView!
