Press-and-hold button for “repeat fire”
You want rapid repeat fire when your button is held down. Your buttonDown and buttonUp methods need to be defined at the top level, and not inside of another function. For demonstration purposes, it is clearer to forgo wiring up @IBActions from the Storyboard and just set up the button in viewDidLoad: class ViewController: UIViewController … Read more