Value of type 'UITableViewCell?' has no member 'delegate'
<p>I am creating a custom delegate in my <code>TableViewCell</code> class and calling it in tableView class, but don't know why this error is coming.  </p>

<p><strong>TableView Class :-</strong></p>

<pre><code> //Cell For Row at indexPath
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell
{
    if (0 == indexPath.section)
    {
        let cell = tableView.dequeueReusableCell(withIdentifier: "FirstRowCell") as! FirstRowCell
        cell.btnReview.addTarget(self, action: #selector(GotoReview), for: UIControlEvents.touchUpInside)

        //cell.
        return cell
    }

    else if ( 1 == indexPath.section)
    {
        let identifier = "TableCollectionCell"
        var tableCollectionCell = tableView.dequeueReusableCell(withIdentifier: identifier)
        if(tableCollectionCell == nil)
        {
            let nib:Array = Bundle.main.loadNibNamed("TableCollectionCell", owner: self, options: nil)!
            tableCollectionCell = nib[0] as! TableCollectionCell

            //Delegate
            tableCollectionCell.delegate = self

        }

        return tableCollectionCell!
    }

    else
    {
        let identifier = "BrandImagesTableCell"
        var brandImagesTableCell = tableView.dequeueReusableCell(withIdentifier: identifier)
        if(brandImagesTableCell == nil)
          {
            let nib:Array = Bundle.main.loadNibNamed("BrandImagesTableCell", owner: self, options: nil)!
            brandImagesTableCell = nib[0] as? BrandImagesTableCell
          }
        return brandImagesTableCell!
    }
}


extension HomeViewController : CollectionViewCellTap
{
  func didTapCollectionViewCell(indexPath: Int) {
    let gotoCreateGroup =  self.storyboard?.instantiateViewController(withIdentifier: "CreateGroupView") as! CreateGroupView

    self.present(gotoCreateGroup, animated: true, completion: nil)
  }
}
</code></pre>

<p>Calling from TableViewCell class :-  </p>

<pre><code>  protocol CollectionViewCellTap
  {
   func didTapCollectionViewCell(indexPath : Int)

  }

  class TableCollectionCell: UITableViewCell {

@IBOutlet weak var collectionView: UICollectionView!

var delegate : CollectionViewCellTap?

override func awakeFromNib() {
    super.awakeFromNib()

    //collectionView cell
    collectionView!.register(UINib(nibName: "CreateGroupCell", bundle: nil), forCellWithReuseIdentifier: "CreateGroupCell")
}

override func setSelected(_ selected: Bool, animated: Bool) {
    super.setSelected(selected, animated: animated)

}

 }

  //Collection View
 extension TableCollectionCell : UICollectionViewDataSource ,UICollectionViewDelegateFlowLayout
 {
    func collectionView(_ collectionView: UICollectionView,  numberOfItemsInSection section: Int) -&gt; Int
{
    return 4
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell
{
    let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CreateGroupCell", for: indexPath) as! CreateGroupCell

    cell.groupName.text = ""
    CreateCardView(viewCorner: cell.cardView)

    if(0 == indexPath.row)
    {
        //cell.btnDotted.tag = indexPath.row
        //cell.btnShare.tag = indexPath.row
        cell.btnDotted.setImage(UIImage(named: "Info"), for: UIControlState.normal)
        cell.btnShare.setImage(UIImage(named : "AddGroup"), for: UIControlState.normal)
    }

    else if(indexPath.row &gt;= 1 &amp;&amp; indexPath.row &lt;= 3)
    {
        cell.btnDotted.isHidden = true
        cell.btnShare.isHidden = true
        cell.groupImage.image = UIImage(named: "group_dull_card.png")
    }

    else
    {

    }

    return cell
}


func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {

    if ( 0 == indexPath.row) {

       delegate?.didTapCollectionViewCell(indexPath: indexPath.row)
    }
}

func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {

    return CGSize(width: 200, height: 150)
}
}
</code></pre>

<p>I am new in iOS.</p>