How to assign an action for UIImageView object in Swift

I’m trying to assign an UIImageView to an action when the user taps it.

I know how to create an action for a UIButton, but how could I mimic the same behavior of a UIButton, but using a UIImageView?

12 Answers
12

Leave a Comment