title: Swift: how to make a UIView clickable in UITableViewCell?
body: <p>Inside a <code>UITableViewCell</code>, I am trying to implement a <strong>button</strong> with both an <strong>image</strong> and a <strong>text</strong>.</p>
  
  <p>It seems the standard <code>UIButton</code> cannot achieve that. So I created a <code>UIView</code> which contains a <code>UIImageView</code> and a <code>UILabel</code>.</p>
  
  <p>You can see the implementation here on the right hand side, the "follow trip" button (the "+" is an UIImageView, and "follow trip" is a UILabel)</p>
  
  <p><a href="https://i.stack.imgur.com/lcRDS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lcRDS.png" alt="enter image description here"></a></p>
  
  <p>I am now trying to make such <code>UIView</code> (i.e. the button) clickable, but I cannot find a way.</p>
  
  <p>This is my implementation, but it doesn't work:</p>
  
  <pre><code>class StationsIntroHeader: UITableViewCell {
  
      @IBOutlet weak var bigButton: UIView!
  
      override  func awakeFromNib() {
          super.awakeFromNib()
          let tap = UITapGestureRecognizer(target: self, action: Selector("followTrip:"))
          bigButton.addGestureRecognizer(tap)
      }
  
      func followTrip(sender:UITapGestureRecognizer) {
          print("tap working")
      }
  }
  </code></pre>
  
  <p>I have made sure the <strong>User Interaction Enabled</strong> is ON on the <code>UIView</code> and OFF on both the <code>UIImageView</code> and <code>UILabel</code></p>