I need to pass an extra parameter to the following line of code
let lpGestureRecognizer: UILongPressGestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(didLongPressCell))
If the function has two parameters like below.
func clicked(sender:AnyObject,value:AnyObject)
{
}
Then
action = "clicked::"
example :
func switchCard(card: Int, withCard card1: Int)
{
print(card)
}
let singleTap1 = UITapGestureRecognizer(target: self, action: "switchCard:withCard:")
Just a note on Swift 2.2. You can now type the selector as
#selector(popoverSelectedCode(_:desc:)