Many developers will do that by setting up a UITapGestureRecognizer and attaching it to the view. However, there is an easier way to do that and that require no code at all.
In short, you can make UIView inherit from UIControl, and hence this will allow the view to respond to touch events like touch up inside, as a UIButton behave.
Here is a quick demo on how to do that directly in storyboard: