Beginner question, I realise that when the Xcode declares a function for @IBAction, it declares it as below:
@IBAction func hardnessSelected(_ sender: UIButton)
,
which I read is,
Create a function called hardness selected which accepts a parameter called sender which accepts the type UI button.
From my understanding so far _ is used when you want to declare a variable that you are not going to mutate e.g. in a for loop to tell swift the value of this variable doesn't matter to optimize performance.
However, in the above case there is a name for the variable "sender" as well as _ which I don't understand why.
Can someone please explain?