   var scrollSpeedFactor: CGFloat = 1
   var collapseDirectionFactor: CGFloat = 1 // Used to determine the sign of content offset depending of collapse direction
   var previousState: NavigationBarState = .expanded // Used to mark the state before the app goes in background
+  var scrollSearchBar: Bool = false
   
   public var isTopViewControllerExtendedUnderNavigationBar: Bool {
     guard let topViewController = topViewController, topViewController.edgesForExtendedLayout.contains(.top) else {

    delayDistance = CGFloat(delay)
    scrollingEnabled = true
    self.additionalOffset = additionalOffset
    
    // Save TabBar state (the state is changed during the transition and restored on compeltion)
    if let tab = followers.map({ $0.view }).first(where: { $0 is UITabBar }) as? UITabBar {

      let translation = gesture.translation(in: superview)
      let delta = (lastContentOffset - translation.y) / scrollSpeedFactor
      
      if !scrollSearchBar, !checkSearchController(delta) {
        lastContentOffset = translation.y
        return
      }
