I am trying to call a function with parameters using the action of UITapGestureRecognizer
and I can\'t figure out any alternative.
This here is the gesture
Further to user2277872
's response that I also found useful, and just for anyone else who may not be familiar - IBAction
functions can also be connected by dragging from the xib to a prewritten function in the class - this is useful if no parameters are desired (i.e. without the :
character that was previously mentioned).
Example with no parameters
@IBAction private func somethingTapped() {
...
}