-
-
Save gunantosteven/9884b1290edde0ae98e270b3b63718e3 to your computer and use it in GitHub Desktop.
Make Difference between Double Tap and Single Tap in UIView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tapImagePhoto = UITapGestureRecognizer(target: self, action: #selector(YourClass.tapImagePhoto)) | |
tapImagePhoto.numberOfTapsRequired = 2 | |
videoPlayerSuperView.addGestureRecognizer(tapImagePhoto) | |
let tapPlayPause = UITapGestureRecognizer(target: self, action: #selector(YourClass.tapPlayPause)) | |
tapPlayPause.numberOfTapsRequired = 1 | |
videoPlayerSuperView.addGestureRecognizer(tapPlayPause) | |
tapPlayPause.require(toFail: tapImagePhoto2) // important code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment