title: Scroll View is not disabled in CollectionView?
body: <p>I'm new to swift and I'm trying to implement a feature in a collectionView (which is scroll enabled.  By default I want the scroll to be enabled and the pangesturerecgonizer disabled. But after a long press is recognized, the scroll would be disabled and the pan gesture  enabled. After the pan gesture is done, it should be disabled and the scroll should be enabled. I have the following code.</p>
  
  <pre><code>lazy var panGesture: UIPanGestureRecognizer = {
      let pan =  UIPanGestureRecognizer(target: self, action: #selector(self.handlePan(sender:)))
          pan.delegate = self
      return pan
  }()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      collectionView.delegate = self
      collectionView.dataSource = self
      collectionView.backgroundColor = UIColor.cyan
      self.view.addSubview(collectionView)
  
      self.view.addConstraint(NSLayoutConstraint(item: collectionView, attribute: .height, relatedBy: .equal, toItem: self.view, attribute: .height, multiplier: 1.0, constant: 0.0))
  
      collectionView.translatesAutoresizingMaskIntoConstraints = false
      collectionView.leftAnchor.constraint(equalTo: view.leftAnchor).isActive = true
      collectionView.rightAnchor.constraint(equalTo: view.rightAnchor).isActive = true
      collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true
      collectionView.addGestureRecognizer(panGesture)
      panGesture.isEnabled = false
  
      let tap = UILongPressGestureRecognizer(target: self, action: #selector(self.handleTap(sender:)))
      tap.delegate = self
      collectionView.addGestureRecognizer(tap)
  
  }
  
  func handlePan(sender: UIPanGestureRecognizer? = nil) {
      var locationOfBeganTap: CGPoint?
  
      if sender?.state == .possible { 
      }
  
      if sender?.state == .ended {
          startTime = NSDate.timeIntervalSinceReferenceDate
      }
  }
  
  func handleTap(sender: UIPanGestureRecognizer? = nil){            
      if sender?.state == .began {
          panGesture.isEnabled = true
          self.collectionView!.isScrollEnabled = false
      }
  
      if sender?.state == .ended {
      }
  }
  </code></pre>
  
  <p>Thanks!</p>