override func viewDidLoad() {
super.viewDidLoad()
var longPressGesture : UILongPressGestureRecognizer!
longPressGesture = UILongPressGestureRecognizer(target: self, action: #selector(MainView.handleLongGesture))
self.view?.addGestureRecognizer(longPressGesture)
}
func handleLongGesture() {
print("long press")
// do Actions
}
}
No comments:
Post a Comment