Detect horizontal panning in UITableView

前端 未结 5 2201
日久生厌
日久生厌 2021-01-31 16:42

I\'m using a UIPanGestureRecognizer to recognize horizontal sliding in a UITableView (on a cell to be precise, though it is added to the table itself). However, this gesture rec

5条回答
  •  情书的邮戳
    2021-01-31 16:56

    Thanks for the tips! I eventually went for a UITableView subclass, where i check if the movement is horizontal (in which case i use my custom behaviour), and else call [super touchesMoved: withEvent:];.

    However, i still don't really get why this works. I checked, and super is a UITableView. It appears i still don't fully understand how this hierarchy works. Can someone try and explain?

提交回复
热议问题