I have a UIButton inside a CollectionViewCell which is again inside the TableViewCell.How do i navigate to next view contoller by clicking UIButton?

I have a UIButton inside a CollectionViewCell which is again inside the TableViewCell.How do i navigate to next view contoller by clicking UIButton?

I have UIButton inside UICollectionViewCell which is inside UITableViewCell, I need to navigate another UIViewController on tapping that UIButton. But UINavigationController is not working inside the UICollectionViewCell. Can anybody please help?

I have UIButton inside UICollectionViewCell which is inside UITableViewCell, I need to navigate another UIViewController on tapping that UIButton. But UINavigationController is not working inside the UICollectionViewCell. Can anybody please help?

I do not find any navigationController in my code.

import UIKit

class TrendingProductTVCell: UITableViewCell {

@IBOutlet weak var trendingProductCV: UICollectionView!

override func awakeFromNib() {
    super.awakeFromNib()
    trendingProductCV.delegate = self
    trendingProductCV.dataSource = self
}

}

extension TrendingProductTVCell: UICollectionViewDataSource, UICollectionViewDelegate {

func numberOfSections(in collectionView: UICollectionView) -> Int {
    return 1
}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let cell = trendingProductCV.dequeueReusableCell(withReuseIdentifier: "TrendingProductsCVCell", for: indexPath) as? TrendingProductsCVCell
    cell?.trendingAddToCartBtn.addTarget(self, action: #selector(addToCartBtnTapped), for: .touchUpInside)
    return cell!
}

@objc
func addToCartBtnTapped(sender: UIButton){
   let productDetail = trendingProductsDataArray[sender.tag]
}

}


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

iOS App Development: How Apple's iOS 13 & Swift 5 Will Change App Development Industry

Want to know how Apple's iOS 13 & Swift 5 will change the iOS app development industry? Refer to this blog that contains in-detail information on it.

How To Build Reminders iOS App in Swift 5 for Beginners

In this video, we build the Reminders App in Swift for iOS. Learn how to use dates, local / user notifications, tableviews, and much more. From scratch to working app, we'll go over every step up toe process together.

Creating an iOS app with user presence using Node.js and Swift

In this tutorial, we are going to see how you can add user presence to an iOS application using Pusher Channels, Node.js, and Swift.