title: Swift - Cannot pass user gesture from custom UICollectionViewCell to UITextField inside it
body: <p>I have a custom <code>UICollectionViewCell</code> (let's call it <code>MyCustomCell</code>) that has a custom <code>UITextField</code> (let's call it <code>MyCustomField</code>) inside it that users can add text to. However, it seems no matter what I do, the tap inputs don't get from the <code>MyCustomCell</code> to its sub-view <code>MyCustomField</code>. Previously, I had this same arrangement, except <code>MyCustomCell</code> is a <code>UITableViewCell</code>, and <em>that worked for some reason.</em></p>
  
  <p>Right now I had to do a <strong>workaround</strong>, where whenever a cell is tapped, the cell sends a <code>becomeFirstResponder()</code> message to the textfield. <strong>However, this doesn't let the user tap on the "clear text" button inside the <code>MyCustomField</code>, nor does it let the user move the cursor around in the text field:</strong></p>
  
  <pre><code>// function inside the MyCustomCell, called by the view controller
  // whenever it thinks the user tapped on a cell:
  func cellTapped()
  {
      // this is an instance of MyCustomField:
      input.becomeFirstResponder();
  }
  </code></pre>
  
  <p>Is there any way to "pass" the actual gesture to the <code>MyCustomField</code> (from either the <code>MyCustomCell</code>, or from the the view controller that manages them both)?</p>
  
  <p><strong>Update:</strong> this is what the view hierarchy looks like for the MyCustomCell (sub-class of UICollectionViewCell):</p>
  
  <p><a href="https://i.stack.imgur.com/1kM3v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1kM3v.png" alt="view hierarchy of MyCustomCell, with the MyCustomField in it"></a></p>