По сути, у меня есть CollectionView внутри tableviewcell, и вот метод, который я использую для передачи в другой viewcontroller.
Вот код :
class recipeRelated: UITableViewCell,UICollectionViewDelegate,UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let resultViewController = storyBoard.instantiateViewController(withIdentifier: "recipeContainerView") as! recipeContainerView
self.window?.rootViewController?.show(resultViewController,sender: self)
}
}
Заранее спасибо!