title: UICollectionViewCell did select item not working
body: <p>I have an issue with a collectionView inside a TableVieCell. When i tap on a collectionCell, didSelectItemAt doesn´t get called. I have a button in the collectionCell so i tried to disable the user interaction and enable the contentView userInteraction  but it didn't work.</p>
  <p><a href="https://drive.google.com/file/d/1_ghcXP9qZnkozTyQeZa0vWgBk7EF-Svn/view?usp=sharing" rel="nofollow noreferrer"><img src="https://drive.google.com/file/d/1_ghcXP9qZnkozTyQeZa0vWgBk7EF-Svn/view?usp=sharing" alt="My Table cell " /></a></p>
  <p>The red rectangle is the tableCell and the blue rectangle is the collecionView insede the table view cell</p>
  <pre><code>    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
  
              if let cell = tableView.dequeueReusableCell(withIdentifier: &quot;MedCellWithCollection&quot;) as? MedCellWithCollection{
                  
                  let backgroundView              =  UIView()
                  backgroundView.backgroundColor  =  UIColor.white.withAlphaComponent(0.0)
                  cell.selectedBackgroundView     =  backgroundView
                                  
                  cell.setMedName(name: self.medCatalog[indexPath.row].nombre, uso: self.medCatalog[indexPath.row].uso , array: self.medCatalog[indexPath.row].enfermedades[0].aplicaciones  , index: indexPath.row)
      
                  cell.layoutIfNeeded()
                  cell.layoutSubviews()
                  cell.setNeedsUpdateConstraints()
                  cell.updateConstraintsIfNeeded()
                  
                 
                  return cell
              }
          
      }
     
      return UITableViewCell()
  }
  </code></pre>
  <p>The tableCell</p>
  <pre><code>class MedCellWithCollection: UITableViewCell {
  
  //Outlets
  @IBOutlet weak var medText: UILabel!
  @IBOutlet weak var uso: UILabel!
  @IBOutlet weak var arrowIcon: UIImageView!
  
  @IBOutlet weak var CollectionView: UICollectionView!
  
  //Variables
  var dosesType:[Aplicacion]?
  
  
  override func awakeFromNib() {
      super.awakeFromNib()
      self.collectionViewSetUp()
      // Initialization code
  }
  
  override func setSelected(_ selected: Bool, animated: Bool) {
      super.setSelected(selected, animated: animated)
  
      // Configure the view for the selected state
  }
  
  
  func setMedName(name: String, uso: String, array: [Aplicacion], index: Int){
      self.medText.text = name
      self.uso.text     = uso
      
      self.dosesType = array
      
      self.CollectionView.reloadData()
  }
  
  
  } 
  extension MedCellWithCollection: UICollectionViewDataSource, UICollectionViewDelegate{
  
  func collectionViewSetUp(){
      self.CollectionView.delegate    =  self
      self.CollectionView.dataSource  =  self
  }
  
  
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return self.dosesType?.count ?? 0
  }
  
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
      
      if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: &quot;doseColletion&quot;, for: indexPath as IndexPath) as? DoseCollection {
          
              
          cell.setButtonConfig(doseType: self.dosesType![indexPath.row].metodo , index: indexPath.row)
              
              return cell
      }
      
      return UICollectionViewCell()
      
  }
  
  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
      print(&quot;tapped&quot;)
  }
  
  }
  </code></pre>
  <p>CollectionCell</p>
  <pre><code>import UIKit
  
  class DoseCollection: UICollectionViewCell {
  
  //Outlets
  @IBOutlet weak var Button: Button!
  
  //Variables
  let constants = Constants()
  
  func setButtonConfig(doseType: String, index: Int){
      
      self.Button.titleLabel?.text = doseType
      
      self.Button.backgroundColor = constants.COLOR_ARRAY[index]
      
      
  }
  
  
  override func layoutSubviews() {
      super.layoutSubviews()
  }
  
  override func layoutIfNeeded() {
      super.layoutIfNeeded()
  }
  
  }
  </code></pre>