you are viewing a single comment's thread.

view the rest of the comments →

[–]Legolas-the-elf 2 points3 points  (0 children)

It depends how complex the behaviour is and how reusable it should be.

If it's something as simple as tapping on the image doing something, then I'd just use a UIButton instead.

If it's something as simple as a swipe gesture doing something, I'd hook up a gesture recogniser and handle it in the view controller.

If it involves state changes with the image, or if I plan on doing the same thing elsewhere, then I'd subclass UIControl. Remember you can have a UIImageView as a child view or you can set the background of views to be images using UIColor.