Sorry about the title it's confusing to explain in a few words. I'm still very new to Swift...
I have a table view controller with 5 rows (each represent a YouTube channel), I want to select that row and it store some kind of value based on which row I selected. I need this value for the next screen which is the list of videos based on which row I selected. I'm using Youtube's API so I need to enter in the channel ID in the URL.
This is all I have so far:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
performSegue(withIdentifier: "goToVideoList", sender: self)
}
Can I maybe somehow have it grab the cell identifier of the row selected (I can store the channel ID here), then put that identifier in a variable? The next screen would just use that variable as the channel ID.
I know it's a stupid question but I'm still a noob. Thanks!