     let collectionView = UICollectionView(frame: .zero, collectionViewLayout: self.collectionViewLayout)
     collectionView.backgroundColor = .white
     collectionView.showsHorizontalScrollIndicator = false
-    collectionView.isScrollEnabled = false
     return collectionView
   }()
 

    case .none:
      break
    }
    collectionViewLayout.registerDecorationViews()
    
    if let state = stateMachine?.state {
      selectViewController(
        state.currentPagingItem,
        direction: .none,
        animated: false)
    }
    
    if #available(iOS 11.0, *) {
      pageViewController.scrollView.contentInsetAdjustmentBehavior = .never
      collectionView.contentInsetAdjustmentBehavior = .never
    }
  }
  
  open override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()
    guard let state = stateMachine?.state else { return }
    
    // We need generate the menu items when the view appears for the
    // first time. Doing it in viewWillAppear does not work as the
    // safeAreaInsets will not be updated yet.
    if didLayoutSubviews == false {
      reloadItems(around: state.currentPagingItem)
      selectCollectionViewItem(for: state.currentPagingItem)
      didLayoutSubviews = true
    }
  }
  
  open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
    super.viewWillTransition(to: size, with: coordinator)
    guard let stateMachine = stateMachine else { return }
    
    coordinator.animate(alongsideTransition: { context in
      stateMachine.fire(.transitionSize)
      let pagingItem = stateMachine.state.currentPagingItem
      self.reloadItems(around: pagingItem)
      self.selectCollectionViewItem(for: pagingItem)
    }, completion: nil)
  }
  
  // MARK: Private
  
  fileprivate func setupGestureRecognizers() {
    let recognizerLeft = UISwipeGestureRecognizer(target: self, action: #selector(handleSwipeGestureRecognizer))
    recognizerLeft.direction = .left
    
    let recognizerRight = UISwipeGestureRecognizer(target: self, action: #selector(handleSwipeGestureRecognizer))
    recognizerRight.direction = .right
    
    collectionView.addGestureRecognizer(recognizerLeft)
    collectionView.addGestureRecognizer(recognizerRight)
  }
  
  @objc fileprivate dynamic func handleSwipeGestureRecognizer(_ recognizer: UISwipeGestureRecognizer) {

  }()

  fileprivate let options: PagingOptions
  fileprivate let sizeCache: PagingSizeCache<T>
  fileprivate var swipeGestureRecognizerLeft: UISwipeGestureRecognizer?
  fileprivate var swipeGestureRecognizerRight: UISwipeGestureRecognizer?
  fileprivate var didLayoutSubviews: Bool = false
  fileprivate var dataStructure: PagingDataStructure<T>
  
  fileprivate var stateMachine: PagingStateMachine<T>? {
    didSet {
      handleStateMachineUpdate()
