Enchilada
Enchilada

Reputation: 3919

Change the appearance of a UIView while tapped down (but not yet released up)

I have a custom UIView, to which I have added a UITapGestureRecognizer to the view in order to detect taps (i.e. finger press and release) on the view. This works fine.

However, I now want to change the appearance of the UIView (making it a bit darker) while the finger is pressed on the view (just like the behavior of a UIButton).

How do I do this?

Upvotes: 0

Views: 273

Answers (1)

fannheyward
fannheyward

Reputation: 19277

Change the appearance in -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event.

Upvotes: 2

Related Questions