Making a slide up view similar to the new Google Maps iOS app, troubles with multiple UIPanGestureRecognizer

前端 未结 1 1106
失恋的感觉
失恋的感觉 2021-02-02 03:06

I am trying to reproduce the behaviour of the slide up menu of the new iOS Google Maps application.

So basically it\'s a view that you can slide up with panning up to a

相关标签:
1条回答
  • 2021-02-02 03:40

    OK, I figured it out!

    I used examples from UIPanGestureRecognizer - Only vertical or horizontal to limit my pan to up and down to vertical scrolling and made turn it to state failed when panned horizontally.

    I also used : Restricting UIPanGestureRecognizer movement to block the view from panning to far up or down.

    Finally I reversed the requiresToFail to :

    [_slideUpScrollView.panGestureRecognizer requireGestureRecognizerToFail:_panGestureRecognizer];
    

    And there it works!

    Let me know if you have questions or have improvements to propose!

    Thanks!

    0 讨论(0)
提交回复
热议问题