I have this simple function that when someone taps the screen, the code inside the function executes, I know the code in the function works and I get no error when it is typed.<
Just change
reload()
to
reload(gestureRecognizer: nil)
and reload
method parameter should be UITapGestureRecognizer?
optional.
func reload(gestureRecognizer: UITapGestureRecognizer?) {
let skView = self.view!
skView.presentScene(scene)
}
Another short way is
change action method that declared with UITapGestureRecognizer
...action: #selector(self.reload())...
means remove (_:)
no need to do anythings more just call reload()
function.