title: UIView touchesBegan not being called
body: <p>I have created a subclass of <code>UIView</code> and added in Views by referencing an xib file.</p>
  
  <p>I overrided the <code>touchesBegan</code> and <code>touchesEnd</code> functions in order to have customized effect of "color changes when user presses on this view".</p>
  
  <p>Below is this subclass:</p>
  
  <pre><code>class CustomUIView: UIView {
  
      @IBOutlet var contentView: UIView!
  
      override init (frame: CGRect) {
          super.init(frame: frame)
          commonInit()
      }
  
      required init? (coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
          commonInit()
      }
  
      private func commonInit () {
          Bundle.main.loadNibNamed("CustomUIView", owner: self, options: nil)
          addSubview(contentView)
          contentView.frame = self.bounds
          contentView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
      }
  
      override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {
          print("touch begin")
          super.touchesBegan(touches, with: event)
      }
  
      override func touchesEnded(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {
          print("touch ended")
          super.touchesEnded(touches, with: event)
      }
  
  }
  </code></pre>
  
  <p>However, <code>touchesBegan</code> and <code>touchesEnd</code> are never called.</p>
  
  <p>I googled and stackoverflowed, tried for 3 hours already, but cannot find any working solution to this simple question....</p>
  
  <p>Below are what I have tried:  </p>
  
  <ol>
  <li>Made sure all superviews have UserInteraction enabled. I even
  captured View Hierarchy to check this.</li>
  <li>Added an <code>IBAction</code> of touchUpInside to see whether this IBAction can be triggered. The answer is yes.</li>
  <li>Subclass UIControl instead and override <code>beginTracking</code> instead. But it is also not triggered.</li>
  </ol>
  
  <p>Below are the properties I can see from ViewHierarchy of this CustomView:  </p>
  
  <ol>
  <li>It is enabled</li>
  <li>User Interaction Enabled On</li>
  <li>Multiple Touch Off</li>
  <li>Alpha 1</li>
  <li>Background <code>&lt;nil color&gt;</code> (I have also tried to set it to have a color. Not working.)</li>
  <li>Opaque On</li>
  <li>Hidden Off</li>
  <li>Clears Graphics Context On</li>
  <li>Clip to Bounds Off</li>
  <li>Autoresize Subviews On</li>
  </ol>
  
  <p>Help very much appreciated!</p>