UIScrollView prevents touchesBegan, touchesMoved, touchesEnded on view controller

前端 未结 5 1904
一整个雨季
一整个雨季 2020-12-05 07:19

I am handling touches for a couple of my UI components in my view controller (custom subclass of UIViewController). It has methods touchesBegan:withEvent:,

5条回答
  •  -上瘾入骨i
    2020-12-05 07:51

    The touchesBegan: etc methods will NEVER be called in a UIScrollView because it is a subclass of UIView and overrides these methods. check out the different UIScrollView methods available here. The work-around will depend on what you want to implement.

提交回复
热议问题