 }
 
 open class BottomNavigationController: UITabBarController {
+  /// A Boolean that indicates if the swipe feature is enabled..
+  open var isSwipeEnabled = false {
+    didSet {
+      guard isSwipeEnabled else {
+        removeSwipeGestureRecognizers()
+        return
+      }
+      
+      prepareSwipeGestureRecognizers()
+    }
+  }
+  
   /**
    An initializer that initializes the object with a NSCoder object.
    - Parameter aDecoder: A NSCoder instance.

    tabBar.backgroundImage = image
    tabBar.backgroundColor = .white
  }
}

private extension BottomNavigationController {
  /// Prepare the UISwipeGestureRecognizers.
  func prepareSwipeGestureRecognizers() {
    removeSwipeGestureRecognizers()

        view.removeGestureRecognizer($0)
      }
  }
}

private extension BottomNavigationController {
  /**
   A UISwipeGestureRecognizer that handles swipes.
   - Parameter _ gesture: A UISwipeGestureRecognizer.
   */
  @objc
  func handleSwipeGesture(_ gesture: UISwipeGestureRecognizer) {
    guard selectedIndex != NSNotFound else {
      return
    }
    
    select(at: .right == gesture.direction ? selectedIndex - 1 : selectedIndex + 1)
  }
}
