Manipulate target of UIGestureRecognizer in action function

87 Views Asked by At

When I click on a view, I would like for that view to change dimensions. TO do that, I need to find the view that has been clicked. Is there any way I could access the view in the function?

Here is the code i've written so far

var tapGesture: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: Selector("recognizeTapGesture:"))
    buttonView.addGestureRecognizer(tapGesture)


func recognizeTapGesture(sender: UIGestureRecognizer)
{
    var something = self
    println("button tapped")

}

Any help would be appreciated.

Thank you

Nikhil

1

There are 1 best solutions below

0
On BEST ANSWER

UIGestureRecognizer has a view property that returns the view it was added to.