Search code examples
iosswiftmobileuislideruipangesturerecognizer

PanGesture event interfering with scrubber scrubbing event


I am implementing a scrubber for a video player and I've encountered an problem. The parent view of the video player(also the parent view of my scrubber) has a panGesture. When the users slide the scrubber bottom-right by a little, it will slide the scrubber by a little bit, and call the IBAction function ScrubberMovementBegins, but I think because of the panGesture interference, it won't call the IBAction func ScrubberMovementEnds , which makes my scrubber seem buggy.

Anyone has encountered this or has a good solution to prevent this from happening?


Solution

  • The straight forward solution is to ignore the panGesture if it is coming from UISlide.