Handling touch events within a child UIScrollView

前端 未结 4 675
青春惊慌失措
青春惊慌失措 2021-02-01 11:27

I\'m displaying a series of images in a UIScrollView. I pretty much want to replicate the Photos application.

My current architecture is:

  • A parent UIScrollView with
  • 4条回答
    •  天涯浪人
      2021-02-01 11:31

      I had to do a similar setup, but I basically custom wrote the whole thing. I'm not sure how you're going to get around the problem of 'handing off' touch events from the child UIScrollView to the parent UISscrollView when you reach the edge. You might try overriding UITouchesBegan:withEvent: in your parent UIScrollView, and dumping directly to the child. Good luck!

    提交回复
    热议问题