title: How to check in UICollectionViewFlowLayout that in which direction the uicollectionview is scrolling? (Swift)
body: <p>I knew how to check the direction using scroll view delegate methods. But unfortunately, I have a situation where I have to do the same in UICollectionViewFlowLayout but I can't access with scroll view delegate methods.
  I tried the ways to check(inside custom layout) in which direction collection view is scrolling, but there was no luck. Please help me in this case.</p>
  
  <p>Further more details:
  I want to check the condition inside the custom layout. If the scroll direction is vertical. I want to find is it going top or bottom.</p>