Search code examples
objective-cuiscrollviewgestures

Custom UIScrollView Gesture


I have a collection view cell which contains an UIScrollview in which all of the content sits. I want to have a gesture that allows users to swipe down when the cell is at 0,0 and then that fades away into the list view of the collection view.

However, I still want the users to be able to scroll down into the rest of the cell content.

Should this be contained in the same gesture? If so, how do I override a scrollview's gesture?

Thanks.


Solution

  • Yea just try implement this method from UIScrollViewDelegate:

    - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
    

    Get scrollView and calculate gestures and make behaviour. And look other methods for make best visual effect :)