Answers for "swift uiview add tap gesture"


swift uiview add tap gesture

let tap = UITapGestureRecognizer(target: self, action: #selector(self.handleTap(_:)))

// Then, you should implement the handler, which will be called each time when a tap event occurs:

@objc func handleTap(_ sender: UITapGestureRecognizer? = nil) {
    // handling code
Posted by: Guest on March-25-2020

Code answers related to "swift uiview add tap gesture"

Code answers related to "Swift"

Browse Popular Code Answers by Language