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

  }
  
  func hideTabBarOnCancel() {
    self.tabBarBottom.constant = -self.tabBarHeight.constant
    UIView.animateWithDuration(self.animationDuration, animations: {
      self.view.layoutIfNeeded()
      })
    { (done) in
      if done {

  }
  
  func hideTabBar() {
    self.tabBar.layoutIfNeeded()
    self.tabBarBottom.constant = -self.tabBarHeight.constant
    UIView.animateWithDuration(self.animationDuration, animations: {
      self.tabBar.setNeedsLayout()
      self.tabBar.layoutIfNeeded()
    }) { (done) in
      if done {
        self.tabBarVisible = false
