title: cocoa: NSView touch event
body: <p>I created a simple cocoa project, and added an <code>NSButton</code> in the window.
  Then I added an <code>NSScrollView</code> to the window and hided the <code>NSButton</code>. 
  However, when I click the scroll view , it is strange that the <code>NSButton</code> action responds!</p>
  
  <p>I guess there is something with the touch event chains, but I failed to find it.
  For example, I try to use:</p>
  
  <pre><code>
  - [NSView becomeFirstResponder];
  - [NSView setAcceptsTouchEvents:];
  </code></pre>
  
  <p>SO what I want is the only the front-most view to become the first responder, and the touch event will not be sent to its superview or so.</p>
  
  <p>Thanks.
  This is the view hierarchy:</p>
  
  <p><img src="https://i.stack.imgur.com/y6acU.png" alt="enter image description here"></p>
  
  <p>the scroll view and button are both added to the window view, and the scrollview's frame includes the button's frame. In other words, the button is hidden by the scroll view but still receives click events.</p>