title: CollectionView Custom Cell accessing atributes outside of the cell
body: <p>I am trying to change some attributes of the custom view cell in my collection view outside of the cell, but I can not figure it out what I am doing wrong:</p>
  
  <p>In cellForItem I have :</p>
  
  <pre><code>          func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
                  let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "PatientProfileCell", for: indexPath) as! PatientQuestionCell
  
                  if Auth.auth().currentUser?.uid == userID {
                    cell.commentButton.setTitle("Edit post", for: .normal)
                    cell.commentButton.addTarget(self, action: #selector(editPostAction), for: .touchUpInside)
                  }
              } else {
                  print("Not the current user for collection view")
              }
            }
  </code></pre>
  
  <p>Everything works perfectly here but when I do trigger the action nothing happens. This is the function :</p>
  
  <pre><code>  //post actions
      func editPostAction()  {
          print("Edit post Enabled")
  
          let cell = PatientQuestionCell()
  
          cell.questionView.isEditable = true
          cell.questionView.isSelectable = true
          cell.questionView.isScrollEnabled = true
          cell.questionView.becomeFirstResponder()
  
      }
  </code></pre>
  
  <p>How can I change the attributes of the cell with this function?</p>