Gesture Recognizers

let doubleTap = UITapGestureRecognizer(target: self, action: #selector(doubleTapHappened(sender:)))
doubleTap.numberOfTapsRequired = 2
doubleTap.numberOfTouchesRequired = 1
let someView = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))someView.addGestureRecognizer(doubleTap)
@objc func doubleTapHappened(sender: UITapGestureRecgonizer){
print("Double Tap Must Have Happened")
}

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

20…21 Reasons to Become Agile

Upgrade Your Skills with the AWS Big Data Specialty Certification

https://www.vmexam.com/aws/aws-big-data-specialty-certification-exam-syllabus

Utilizing GitHub actions to build and test on multiple platforms

你好,李焕英 (Hi, Mom) 線上看|2021上映|完整版小鴨|線上看小鴨|

Resize CGImage

How to Play Sound Effects in Unity

Which design architecture works best for your idea & iOS product? MVC, MVVM, MVP, or VIPER?

Unity Development — Background Music

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Juan Torres

Juan Torres

More from Medium

Introduction to EntreBurnor — The First

Benefits of ServiceNow Jira integration and use cases

MoneDigi-DeFi

What is Alanna Rizzo’s Nationality, Family background, and Marital Status?